about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-06 21:23:40 +0100
committerSoispha <soispha@vhack.eu>2024-01-06 21:23:40 +0100
commitda9e441d99141d8b0870bb479185783c940ae321 (patch)
tree8a094576e00c207bbaa7afde1776bf83397068f1
parentfix(sys/nixpkgs/pkgs/ytc/scr/main): Also delete the file if no id is set (diff)
downloadnixos-config-da9e441d99141d8b0870bb479185783c940ae321.tar.gz
nixos-config-da9e441d99141d8b0870bb479185783c940ae321.zip
fix(hm/pkgs/scr/specific/ytcc/yts): Recognize '' as a command
Diffstat (limited to '')
-rwxr-xr-xhm/soispha/pkgs/scripts/specific/ytcc/yts7
1 files changed, 4 insertions, 3 deletions
diff --git a/hm/soispha/pkgs/scripts/specific/ytcc/yts b/hm/soispha/pkgs/scripts/specific/ytcc/yts
index f2e6ef35..1e8f1c8e 100755
--- a/hm/soispha/pkgs/scripts/specific/ytcc/yts
+++ b/hm/soispha/pkgs/scripts/specific/ytcc/yts
@@ -11,7 +11,6 @@ cleanup() {
 trap cleanup EXIT
 
 help_text="
-#
 # Commands:
 # w, watch <id> = watch id
 # d, drop <id> = mark id as watched
@@ -35,7 +34,10 @@ is_first=true;
 while read -r line; do
     cmd="$(echo "$line" | awk '{print $1}')";
     case "$cmd" in
-        "#" )
+        "" )
+            # An empty line, simply ignore it
+            ;;
+        "#")
             # This is a comment, do nothing here
             ;;
         "pick" | "p")
@@ -60,5 +62,4 @@ while read -r line; do
 done < "$selection_file"
 
 [ -n "$1" ] && ytc "id" "$@";
-
 # vim: ft=sh