Clear the selection for uniform behaviour

This commit is contained in:
Arun Prakash Jana 2021-05-29 16:06:42 +05:30
parent c54ba35ce0
commit 6f29138299
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -39,6 +39,11 @@ fi
if [ -n "$1" ] && [ "$(file -b --mime-type "$1")" = 'text/plain' ] && [ -e "$(head -1 "$1")" ]; then
LIST="$1"
elif ! [ -s "$LIST" ]; then
# Clear selection
if [ -p "$NNN_PIPE" ]; then
printf "-" >"$NNN_PIPE"
fi
sel=$(fzf)
# Show only the file and parent dir
# sel=$(fzf --delimiter / --with-nth=-2,-1 --tiebreak=begin --info=hidden)