From: Arun Prakash Jana Date: Sat, 29 May 2021 10:36:42 +0000 (+0530) Subject: Clear the selection for uniform behaviour X-Git-Tag: v4.1~11 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6f2913829955fd61e14c5e76585cb4f899e15a6c;p=nnn.git Clear the selection for uniform behaviour --- diff --git a/plugins/fzcd b/plugins/fzcd index 077456ab..ae333924 100755 --- a/plugins/fzcd +++ b/plugins/fzcd @@ -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)