aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-28 12:24:36 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-28 12:24:36 +0000
commite8e4fcff0e60ca108084138dba19b11aa3426723 (patch)
tree931a245ca5396770eb03afa1b49c73e29507cb17
parent3c7ea81b2403a8fb36081845bcf2f4102a665bb4 (diff)
downloadcpt-e8e4fcff0e60ca108084138dba19b11aa3426723.tar.gz
kiss: initial a arg
FossilOrigin-Name: 09df03f2d78f213d5734f471300bebf25da4d142dce4909af4ef85e7edddf80a
-rwxr-xr-xkiss19
1 files changed, 18 insertions, 1 deletions
diff --git a/kiss b/kiss
index d17e32a..676fd43 100755
--- a/kiss
+++ b/kiss
@@ -1169,7 +1169,24 @@ args() {
# keystrokes once you memorize the commands.
case $action in
a|alternatives)
-
+ if [ "$1" ]; then
+ :
+ else
+ log "Alternatives:"
+
+ # Go to the choices directory and hide errors
+ # as there is nothing to list if the directory
+ # doesn't exist.
+ cd "$sys_db/../choices" 2>/dev/null
+ set +f
+
+ # Go over each alternative and format the file
+ # name for listing. (pkg_name>usr>bin>ls)
+ for pkg in *; do
+ [ -f "$pkg" ] &&
+ printf '%s\n' "$pkg" | sed 's|>|: /|;s|>|/|g'
+ done
+ fi
;;
b|build)