diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 18:33:53 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 18:33:53 +0000 |
commit | 1c7c1ed2f80b09e12addaf46753bc1679c7251d3 (patch) | |
tree | 7266a226fe9c633a024e3b668fde75b286b84810 | |
parent | bdf8515cf11c155f3e4f267dbe994a7e0b6742ac (diff) | |
download | cpt-1c7c1ed2f80b09e12addaf46753bc1679c7251d3.tar.gz |
kiss: Read alternatives over stdin
FossilOrigin-Name: 2ad7d3dcd8f831545b409fdf2016318ec3eba843c4d59fcb19df6d0d3f747f30
-rwxr-xr-x | kiss | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |