kiss: Read alternatives over stdin

This commit is contained in:
Dylan Araps 2020-01-28 20:33:54 +02:00
parent e4107420f4
commit e8983a341b
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 6 additions and 1 deletions

7
kiss
View File

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