kiss: avoid creating argument list
This commit is contained in:
parent
51c92cf2c7
commit
7ccd59977d
14
kiss
14
kiss
|
@ -1234,19 +1234,15 @@ args() {
|
||||||
pkg_swap "$@"
|
pkg_swap "$@"
|
||||||
|
|
||||||
else
|
else
|
||||||
log "Alternatives:"
|
|
||||||
|
|
||||||
# Go to the choices directory and hide errors
|
|
||||||
# as there is nothing to list if the directory
|
|
||||||
# doesn't exist.
|
|
||||||
cd "$sys_db/../choices" 2>/dev/null
|
|
||||||
set +f
|
set +f
|
||||||
|
|
||||||
# Go over each alternative and format the file
|
# Go over each alternative and format the file
|
||||||
# name for listing. (pkg_name>usr>bin>ls)
|
# name for listing. (pkg_name>usr>bin>ls)
|
||||||
for pkg in *; do
|
for pkg in "$sys_db/../choices"/*; do
|
||||||
[ "$pkg" = '*' ] || printf '%s\n' "$pkg"
|
printf '%s\n' "${pkg##*/}"
|
||||||
done | sed 's|>| /|;s|>|/|g'
|
done |
|
||||||
|
|
||||||
|
sed 's|>| /|; s|>|/|g; /\*/d'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue