-
Notifications
You must be signed in to change notification settings - Fork 2.3k
bug: Use C style strings when checking for invalid alias characters #2188
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
bug: Use C style strings when checking for invalid alias characters #2188
Conversation
Before, the '\n' would be interpreted as 'n' meaning that any alias who's command contained the letter 'n' would incorrect be skipped.
Closing while I verify more details. Sorry for opening early. |
Those CI and lint failures do not look related to my change. Anyone have ideas what's up with that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR ! See my notes regarding simplifying the string for clarity.
Escaping was just adding \ to the list multiple times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR to re-add the missing\
for the newline, and re-arrange the characters for clarity.
I'm going to mark this approved but pls feel free to do a final test in your local and report any issues.
@davidpfarrell Thank you for that. I added the \ for the newline locally while testing but totally forget to commit it. |
What needs to happen at this point to get this merged? |
The failing lint test seems unreleated but it does look like your fork's branch and master both diverged beyond this PR, which may be contributing. The merge looks clean, so I'm going to go ahead and merge it. |
* upstream/master: (1190 commits) Add support to powerline themes to override foreground color (Bash-it#2231) ci: Update GitHub actions v2 => v4 (Bash-it#2224) docs: Update Bats libraries links (Bash-it#2225) fix: bumps go version to 1.21.0 and changes go get to go install [terraform] add alias for terraform workspace fix (completion): suppress 1091 in brew (Bash-it#2130) Allow for longer command min duration (Bash-it#2198) Implement yarn completion (Bash-it#2190) Fix lint errors in multiple files (Bash-it#2192) bug: Use C style strings when checking for invalid alias characters (Bash-it#2188) Remove libra chat reference Add more aliases for `git branch`, use long form remove function wrapper around kubectl alias registration bug: Use en_US when fetching EPOCHREALTIME bug:Install shellcheck wget (Bash-it#2173) fix(theme): use correct escape sequence to avoid weird text overwriting chore: Use grep -E / grep -F instead of egrep / fgrep (Bash-it#2164) Fixed broken code blocks in troubleshooting.rst Removed Bash Dependency section from README and added it to troubleshooting.rst Update variable name to match projects.plugin.bash ...
Description
Before, the '\n' in the characters being checked would be interpreted as 'n' rather than newline meaning that any alias who's command contained the letter 'n' would be incorrectly skipped.
Motivation and Context
This bug is annoying as certain aliases will appear to randomly not have completion for them.
How Has This Been Tested?
alias gb='git branch'
alias now shows the correct completionTypes of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.