nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 6f2913829955fd61e14c5e76585cb4f899e15a6c
parent c54ba35ce0055b1e2c6afcdc46e0baa3fa1280da
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sat, 29 May 2021 16:06:42 +0530

Clear the selection for uniform behaviour

Diffstat:
Mplugins/fzcd | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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)