Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove superfluous / duplicate squared brakets from AWS profile definition #829

Merged
merged 2 commits into from Apr 15, 2024

Conversation

milouse
Copy link
Contributor

@milouse milouse commented Apr 15, 2024

The upcoming 2.2.0 release introduces new mechanism to either join or display individual dev env variables. At one point one removed the various hardcoded enclosing squared brackets from the various colored definition of each dev env variable to allow to join them, but miss the AWS profile one.

This may come from the fact the AWS functions were a bit misplaced in the file. Thus the first commit of this MR move back the code (without modifying it) up in the file, alongside other dev env definition. Then the second commit remove the duplicate brackets.

Technical checklist:

  • code follows our shell standards:
    • correct use of IFS
    • careful quoting
    • cautious array access
    • portable array indexing with _LP_FIRST_INDEX
    • printing a "%" character is done with _LP_PERCENT
    • functions/variable naming conventions
    • functions have local variables
    • data functions have optimization guards (early exits)
    • subshells are avoided as much as possible
    • string substitutions may be done differently in Bash and Zsh (use _LP_SHELL_*)
  • tests and checks have been added, ran, and their warnings fixed:
    • unit tests have been updated (see tests/test_*.sh files)
    • ran tests.sh
    • ran shellcheck.sh (requires shellcheck).
  • documentation have been updated accordingly:
    • functions and attributes are documented in alphabetical order
    • new sections are documented in the default theme
    • tag .. versionadded:: X.Y or .. versionchanged:: Y.Z
    • functions signatures have arguments, returned code, and set value(s)
    • attributes have types and defaults
    • ran docs/docs-lint.sh (requires Python 3 and requirements.txt
      installed (cd docs/; python3 -m venv venv; . venv/bin/activate; pip install -r requirements.txt))

Copy link
Collaborator

@Rycieos Rycieos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks.

@Rycieos Rycieos added bug theme Related to the display of data and/or generation of the prompt labels Apr 15, 2024
@Rycieos Rycieos added this to the v2.2 milestone Apr 15, 2024
@Rycieos Rycieos merged commit 8d08eeb into liquidprompt:master Apr 15, 2024
5 checks passed
@milouse milouse deleted the fix/aws-profile branch April 16, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug theme Related to the display of data and/or generation of the prompt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants