mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Address shellcheck warnings
This commit is contained in:
parent
7d3fb89608
commit
a6b8996f2a
@ -17,7 +17,8 @@ EOF
|
||||
asdf_extension_cmds() {
|
||||
local plugins_path ext_cmds
|
||||
plugins_path="$(get_plugin_path)"
|
||||
# shellcheck disable=SC2012 # use find instead of ls -1
|
||||
# use find instead of ls -1
|
||||
# shellcheck disable=SC2012
|
||||
ext_cmds="$(ls -1 "$plugins_path"/*/bin/command* 2>/dev/null | sed "s#$plugins_path/# asdf #;"'s#/bin/command##g;s#-# #g')"
|
||||
if test -n "$ext_cmds"; then
|
||||
echo "$ext_cmds" | cut -d' ' -f 4 | uniq | while read -r plugin; do
|
||||
|
@ -10,7 +10,7 @@ latest_command() {
|
||||
|
||||
# pattern from xxenv-latest (https://github.com/momo-lab/xxenv-latest)
|
||||
asdf list-all "$plugin_name" "$query" |
|
||||
grep -vE "(^Available versions:|-src|-dev|-latest|-stm|[-\.]rc|-alpha|-beta|[-\.]pre|-next|(a|b|c)[0-9]+|snapshot|master)" |
|
||||
grep -vE "(^Available versions:|-src|-dev|-latest|-stm|[-\\.]rc|-alpha|-beta|[-\\.]pre|-next|(a|b|c)[0-9]+|snapshot|master)" |
|
||||
sed 's/^\s\+//' |
|
||||
sort --version-sort |
|
||||
tail -1
|
||||
|
@ -13,7 +13,7 @@ list_all_command() {
|
||||
if [[ $query ]]; then
|
||||
versions=$(echo "$versions" |
|
||||
tr ' ' '\n' |
|
||||
grep -E "^\s*$query" |
|
||||
grep -E "^\\s*$query" |
|
||||
tr '\n' ' ')
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user