Browse Source

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

emacs-27
Leonid Plyushch 6 years ago
parent
commit
5b74f8e0fb
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 18
      packages/termux-tools/pkg

18
packages/termux-tools/pkg

@ -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

Loading…
Cancel
Save