commit 78b504676b32a1a63b5e1386f1f892bad3c5df4a
parent 92bde96aebb733668c4a0d4bebbbd140b6259cfd
Author: Jacob R. Edwards <n/a>
Date: Sun, 4 Dec 2022 21:41:16 -0600
Fix bugs ap tagging script and add list command
The list command simply lists the files in the tag directory. The
bugs are described here:
- The tags directory was set using an undefined variable
- Arguments were not passed to tag through the wrapper function
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/local/ap/config/ap/bin/tag b/local/ap/config/ap/bin/tag
@@ -2,9 +2,9 @@
# Copyright 2022 Jacob R. Edwards
# Tagging interface
-tag() command tag -a -t "$tags"
+tag() command tag -a -t "$tags" "$@"
-tags="$base"/tags
+tags="$HOME"/music/tags
com="${1:?No command}"
shift
@@ -12,10 +12,12 @@ case "$com" in
(cur|current) apc name | tag "$@" ;;
(show) tag -p "$@" ;;
(load) tag -p "$@" | revf | ap truncate ^ ;;
+(list) ls -1 "$tags" ;;
(*)
echo "usage: tag cur[rent] [tag ...]
tag show [tag ...]
tag load [tag ...]
+ tag list
$1: Unknown command" 1>&2
exit 1
esac