mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-12 19:27:18 +00:00
Fail on invalid selection
This commit is contained in:
parent
1c73a80dfc
commit
0d0e9031d0
|
@ -11,6 +11,10 @@ if [ -n "$1" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
selected=$(printf "$SELECTABLE" | fzf)
|
selected=$(printf "$SELECTABLE" | fzf)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Invalid selection: '$selected'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
selected=$(printf "$selected" | tail -1)
|
selected=$(printf "$selected" | tail -1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue