commit e8983a341b9fde37bfd3f46114add81140de3432
parent e4107420f48ae7b13dd591a45b076ab715b51b21
Author: Dylan Araps <dylan.araps@gmail.com>
Date: Tue, 28 Jan 2020 20:33:54 +0200
kiss: Read alternatives over stdin
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kiss b/kiss
@@ -1239,7 +1239,12 @@ args() {
# keystrokes once you memorize the commands.
case $action in
a|alternatives)
- if [ "$1" ]; then
+ if [ "$1" = - ]; then
+ while read -r pkg path; do
+ pkg_swap "$pkg" "$path"
+ done
+
+ elif [ "$1" ]; then
pkg_swap "$@"
else