From 6f2913829955fd61e14c5e76585cb4f899e15a6c Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 29 May 2021 16:06:42 +0530 Subject: [PATCH] Clear the selection for uniform behaviour --- plugins/fzcd | 5 +++++ 1 file changed, 5 insertions(+) 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)