Skip to content

Conversation

convergedtarkus
Copy link
Contributor

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?

  • Tests pass locally.
  • My alias gb='git branch' alias now shows the correct completion
  • Tested that the C style string usage still correctly identifies aliases with disallowed characters

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

Before, the '\n' would be interpreted as 'n' meaning that any alias
who's command contained the letter 'n' would incorrect be skipped.
@convergedtarkus
Copy link
Contributor Author

Closing while I verify more details. Sorry for opening early.

@convergedtarkus
Copy link
Contributor Author

Those CI and lint failures do not look related to my change. Anyone have ideas what's up with that?

Copy link
Contributor

@davidpfarrell davidpfarrell left a 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.

Copy link
Contributor

@davidpfarrell davidpfarrell left a 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.

@convergedtarkus
Copy link
Contributor Author

@davidpfarrell Thank you for that. I added the \ for the newline locally while testing but totally forget to commit it.

@convergedtarkus
Copy link
Contributor Author

What needs to happen at this point to get this merged?

@davidpfarrell
Copy link
Contributor

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.

@davidpfarrell davidpfarrell merged commit feb468b into Bash-it:master Jan 25, 2023
douglasjacobsen added a commit to douglasjacobsen/bash-it that referenced this pull request Jan 19, 2024
* 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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants