lib/helpers: first shellcheck pass

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 #1865 from NoahGorny...and clean it a bit...
This commit is contained in:
John D Pell
2022-01-03 15:57:18 -08:00
committed by John D Pell
parent 9b51dc0b5f
commit 5eab3bd288
6 changed files with 401 additions and 366 deletions

0
test/fixtures/go/go path/bin/.keep vendored Normal file
View File

0
test/fixtures/go/gopath/bin/.keep vendored Normal file
View File

0
test/fixtures/go/gopath2/bin/.keep vendored Normal file
View File