termux-tools: prevent word-splitting of arguments with space

This commit is contained in:
Leonid Pliushch 2019-05-06 23:22:47 +03:00
parent 14e3026432
commit 2e28a119ef
1 changed files with 9 additions and 9 deletions

View File

@ -31,16 +31,16 @@ CMD="$1"
shift 1
case "$CMD" in
f*) dpkg -L $@;;
f*) dpkg -L "$@";;
h*) show_help;;
add|i*) assert_not_root; apt update; apt install $@;;
list-a*) apt list $@;;
list-i*) apt list --installed $@;;
rei*) assert_not_root; apt install --reinstall $@;;
se*) assert_not_root; apt update; apt search $@;;
sh*) apt show $@;;
un*|rem*|rm|del*) assert_not_root; apt remove $@;;
up*) assert_not_root; apt update; apt full-upgrade $@;;
add|i*) assert_not_root; apt update; apt install "$@";;
list-a*) apt list "$@";;
list-i*) apt list --installed "$@";;
rei*) assert_not_root; apt install --reinstall "$@";;
se*) assert_not_root; apt update; apt search "$@";;
sh*) apt show "$@";;
un*|rem*|rm|del*) assert_not_root; apt remove "$@";;
up*) assert_not_root; apt update; apt full-upgrade "$@";;
*) echo "Unknown command: '$CMD' (run 'pkg help' for usage information)";;
esac