diff --git a/home/.local/bin/scripts/cheat.sh b/home/.local/bin/scripts/cheat.sh index ac659c9..f7c8559 100755 --- a/home/.local/bin/scripts/cheat.sh +++ b/home/.local/bin/scripts/cheat.sh @@ -11,6 +11,10 @@ if [ -n "$1" ]; then fi else selected=$(printf "$SELECTABLE" | fzf) + if [ $? -ne 0 ]; then + echo "Invalid selection: '$selected'" + exit 1 + fi selected=$(printf "$selected" | tail -1) fi