mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Fail on invalid selection
This commit is contained in:
parent
1c73a80dfc
commit
0d0e9031d0
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue