mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Clear the selection for uniform behaviour
This commit is contained in:
parent
c54ba35ce0
commit
6f29138299
|
@ -39,6 +39,11 @@ fi
|
||||||
if [ -n "$1" ] && [ "$(file -b --mime-type "$1")" = 'text/plain' ] && [ -e "$(head -1 "$1")" ]; then
|
if [ -n "$1" ] && [ "$(file -b --mime-type "$1")" = 'text/plain' ] && [ -e "$(head -1 "$1")" ]; then
|
||||||
LIST="$1"
|
LIST="$1"
|
||||||
elif ! [ -s "$LIST" ]; then
|
elif ! [ -s "$LIST" ]; then
|
||||||
|
# Clear selection
|
||||||
|
if [ -p "$NNN_PIPE" ]; then
|
||||||
|
printf "-" >"$NNN_PIPE"
|
||||||
|
fi
|
||||||
|
|
||||||
sel=$(fzf)
|
sel=$(fzf)
|
||||||
# Show only the file and parent dir
|
# Show only the file and parent dir
|
||||||
# sel=$(fzf --delimiter / --with-nth=-2,-1 --tiebreak=begin --info=hidden)
|
# sel=$(fzf --delimiter / --with-nth=-2,-1 --tiebreak=begin --info=hidden)
|
||||||
|
|
Loading…
Reference in a new issue