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)