Skip to content

Commit

Permalink
lib/helpers: first shellcheck pass
Browse files Browse the repository at this point in the history
Quote things, SC2268, SC2143, SC2181, SC2162, SC2016, SC2013, &c.

Rewrite globbing per `shellcheck`’s SC2013, and alsö s/typeset/local/g. Eliminate `compgen` where possible.

Alsö: use the existing utility functions `_bash-it-get-component-type-from-path` and `_bash-it-get-component-name-from-path`, which just use parameter substitution anyway. Why was `sed` here?

Alsö, don't add not-existing directories to `$PATH` in `pathmunge()`.

Finally, merge PR Bash-it#1865 from NoahGorny...and clean it a bit...
  • Loading branch information
gaelicWizard committed Jan 9, 2022
1 parent 170d70d commit 418997e
Show file tree
Hide file tree
Showing 6 changed files with 422 additions and 387 deletions.
Loading

0 comments on commit 418997e

Please sign in to comment.