diff --git a/plugins/README.md b/plugins/README.md index 5566f0e4..8502fe42 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -25,7 +25,7 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina | [dups](dups) | List non-empty duplicate files in current dir | bash | find, md5sum,
sort uniq xargs | | [finder](finder) | Run custom find command and list | sh | - | | [fixname](fixname) | Clean filename to be more shell-friendly [✓] | bash | sed | -| [fzcd](fzcd) | Fuzzy search multiple dirs (or `$PWD`) and visit file [✓] | sh | fzf, (fd) | +| [fzcd](fzcd) | Fuzzy search multiple dirs (or `$PWD`) and visit file | sh | fzf, (fd) | | [fzhist](fzhist) | Fuzzy-select a cmd from history, edit in `$EDITOR` and run | sh | fzf, mktemp | | [fzopen](fzopen) | Fuzzy find file(s) in subtree to edit/open/pick | sh | fzf, xdg-open | | [fzplug](fzplug) | Fuzzy find, preview and run other plugins | sh | fzf | diff --git a/plugins/fzcd b/plugins/fzcd index ae333924..64c9a541 100755 --- a/plugins/fzcd +++ b/plugins/fzcd @@ -17,9 +17,6 @@ # - pick the (file)paths in picker mode to path-list file # - OR, edit selection in nnn and save as path-list file # -# The plugin clears nnn selection as the user can be tempted to delete -# duplicate files after finding copies and remove selection by mistake. -# # Shell: POSIX compliant # Author: Anna Arad, Arun Prakash Jana @@ -39,11 +36,6 @@ 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) @@ -63,11 +55,6 @@ if [ -n "$LIST" ]; then fi done < "$LIST" - # Clear selection - if [ -p "$NNN_PIPE" ]; then - printf "-" >"$NNN_PIPE" - fi - sel=$(xargs -d '\n' -a "$tmpfile" fd -H . | fzf --delimiter / --tiebreak=begin --info=hidden) rm "$tmpfile"