aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-06 18:41:01 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-06 18:41:01 +0530
commit4832fc5fe1297f1241310f2453b850c72743e1bd (patch)
tree47c27a2f7309e9b1a5874df55635e383e667ac71 /plugins
parentc8ecf06c515054595ac1dfa34989a3a7d26373ce (diff)
downloadnnn-4832fc5fe1297f1241310f2453b850c72743e1bd.tar.gz
Drop fzy support
Diffstat (limited to 'plugins')
-rw-r--r--plugins/.nnn-plugin-helper2
-rw-r--r--plugins/README.md12
-rwxr-xr-xplugins/fzcd14
-rwxr-xr-xplugins/fzhist2
-rwxr-xr-xplugins/fzopen6
-rwxr-xr-xplugins/fzz4
-rwxr-xr-xplugins/launch4
-rwxr-xr-xplugins/pskill4
8 files changed, 14 insertions, 34 deletions
diff --git a/plugins/.nnn-plugin-helper b/plugins/.nnn-plugin-helper
index 0f74fc7..bcb9649 100644
--- a/plugins/.nnn-plugin-helper
+++ b/plugins/.nnn-plugin-helper
@@ -15,7 +15,7 @@ export CUR_CTX
## Ask nnn to switch to directory $1 in context $2.
## If $2 is not provided, the function asks explicitly.
nnn_cd () {
- dir=$1
+ dir="$1"
if [ -z "$NNN_PIPE" ]; then
echo "No pipe file found" 1>&2
diff --git a/plugins/README.md b/plugins/README.md
index ff168a2..c902a00 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -34,10 +34,10 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.
| diffs | Diff for selection (limited to 2 for directories) | sh | vimdiff |
| dragdrop | Drag/drop files from/into nnn | sh | [dragon](https://github.com/mwh/dragon) |
| finder | Run custom find command and list | sh | - |
-| fzcd | Change to the directory of a fuzzy-selected file/dir | sh | fzf/fzy<br>fd/fdfind/find |
-| fzhist | Fuzzy-select a cmd from history, edit in `$EDITOR` and run | sh | fzf/fzy |
-| fzopen | Fuzzy find a file in dir subtree and edit or open | sh | fzf/fzy, xdg-open |
-| fzz | Change to any directory in the z database with fzf/fzy | sh | fzf/fzy, z |
+| fzcd | Change to the directory of a fuzzy-selected file/dir | sh | fzf |
+| fzhist | Fuzzy-select a cmd from history, edit in `$EDITOR` and run | sh | fzf |
+| fzopen | Fuzzy find a file in dir subtree and edit or open | sh | fzf, xdg-open |
+| fzz | Change to any directory in the z database with fzf | sh | fzf, z |
| getplugs | Update plugins to installed `nnn` version | sh | curl |
| gutenread | Browse, download, read from Project Gutenberg | sh | curl, unzip, w3m<br>[epr](https://github.com/wustho/epr) (optional) |
| hexview | View a file in hex in `$PAGER` | sh | xxd |
@@ -47,7 +47,7 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.
| imgview | Browse images, set wallpaper, copy path ([config](https://wiki.archlinux.org/index.php/Sxiv#Assigning_keyboard_shortcuts)), [rename](https://github.com/jarun/nnn/wiki/Basic-use-cases#browse-rename-images)| sh | sxiv/[viu](https://github.com/atanunq/viu), less|
| ipinfo | Fetch external IP address and whois information | sh | curl, whois |
| kdeconnect | Send selected files to an Android device | sh | kdeconnect-cli |
-| launch | GUI application launcher | sh | fzf/fzy |
+| launch | GUI application launcher | sh | fzf |
| mediainf | Show media information | sh | mediainfo |
| mimelist | List files by mime in subtree | sh | fd/find |
| moclyrics | Show lyrics of the track playing in moc | sh | [ddgr](https://github.com/jarun/ddgr), [moc](http://moc.daper.net/) |
@@ -63,7 +63,7 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.
| picker | Pick files and list one per line (to pipe) | sh | nnn |
| preview-tabbed | `tabbed`/xembed based file previewer | bash | _see in-file docs_ |
| preview-tui | Simple TUI file previewer (needs NNN_FIFO) | sh | tmux/xterm/<br>\$TERMINAL, file, tree |
-| pskill | Fuzzy list by name and kill process or zombie | sh | fzf/fzy, ps,<br>sudo/doas |
+| pskill | Fuzzy list by name and kill process or zombie | sh | fzf, ps, sudo/doas |
| renamer | Batch rename selection or files in dir | sh | [qmv](https://www.nongnu.org/renameutils/)/[vidir](https://joeyh.name/code/moreutils/) |
| ringtone | Create a variable bitrate mp3 ringtone from file | sh | date, ffmpeg |
| splitjoin | Split file or join selection | sh | split, cat |
diff --git a/plugins/fzcd b/plugins/fzcd
index 5e0b5f0..1925d77 100755
--- a/plugins/fzcd
+++ b/plugins/fzcd
@@ -1,23 +1,13 @@
#!/usr/bin/env sh
-# Description: Run fzf/fzy, fd/fdfind/find and go to the directory of the file selected
+# Description: Run fzf and go to the directory of the file selected
#
# Shell: POSIX compliant
# Author: Anna Arad
. "$(dirname "$0")"/.nnn-plugin-helper
-if [ "$(cmd_exists fzy)" -eq "0" ]; then
- if [ "$(cmd_exists fd)" -eq "0" ]; then
- fd=fd
- elif [ "$(cmd_exists fdfind)" -eq "0" ]; then
- fd=fdfind
- else
- fd=find
- fi
-
- sel=$($fd | fzy)
-elif [ "$(cmd_exists fzf)" -eq "0" ]; then
+if [ "$(cmd_exists fzf)" -eq "0" ]; then
sel=$(fzf)
else
exit 1
diff --git a/plugins/fzhist b/plugins/fzhist
index e5618ae..a3aac3a 100755
--- a/plugins/fzhist
+++ b/plugins/fzhist
@@ -8,8 +8,6 @@
if which fzf >/dev/null 2>&1; then
fuzzy=fzf
-elif which fzy >/dev/null 2>&1; then
- fuzzy=fzy
else
exit 1
fi
diff --git a/plugins/fzopen b/plugins/fzopen
index a678627..677ea26 100755
--- a/plugins/fzopen
+++ b/plugins/fzopen
@@ -1,10 +1,10 @@
#!/usr/bin/env sh
-# Description: Fuzzy find a file in directory subtree with fzy
+# Description: Fuzzy find a file in directory subtree
# Opens in $VISUAL or $EDITOR if text
# Opens other type of files with xdg-open
#
-# Dependencies: fd/find, fzf/fzy/skim, xdg-open
+# Dependencies: fd/find, fzf/skim, xdg-open
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
@@ -19,8 +19,6 @@ if which fzf >/dev/null 2>&1; then
entry="$(eval "$cmd" | fzf --delimiter / --nth=-1 --tiebreak=begin --info=hidden)"
# To show only the file name
# entry=$(find . -type f 2>/dev/null | fzf --delimiter / --with-nth=-1 --tiebreak=begin --info=hidden)
-elif which fzy >/dev/null 2>&1; then
- entry=$(find . -type f 2>/dev/null | fzy)
elif which sk >/dev/null 2>&1; then
entry=$(find . -type f 2>/dev/null | sk)
else
diff --git a/plugins/fzz b/plugins/fzz
index 5b40269..049cf9d 100755
--- a/plugins/fzz
+++ b/plugins/fzz
@@ -9,8 +9,6 @@
if which fzf >/dev/null 2>&1; then
fuzzy=fzf
-elif which fzy >/dev/null 2>&1; then
- fuzzy=fzy
else
exit 1
fi
@@ -19,7 +17,7 @@ datafile="${_Z_DATA:-$HOME/.z}"
if [ -f "$datafile" ]; then
# I read the data from z's file instead of calling the z command so that the data doesn't need to be processed twice
sel=$(awk -F "|" '{print $1}' "$datafile" | "$fuzzy" | awk '{$1=$1};1')
- # NOTE: Uncomment this line and comment out the line above if you want to see the weightings of the dir's in the fzf/fzy pane
+ # NOTE: Uncomment this line and comment out the line above if you want to see the weightings of the dir's in the fzf pane
# sel=$(awk -F "|" '{printf "%s %s\n", $2, $1}' "$datafile" | "$fuzzy" | sed 's/^[0-9,.]* *//' | awk '{$1=$1};1')
else
exit 1
diff --git a/plugins/launch b/plugins/launch
index e983140..19855f9 100755
--- a/plugins/launch
+++ b/plugins/launch
@@ -9,7 +9,7 @@
#
# xfce4-terminal -e "${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/launch
#
-# Dependencies: fzf/fzy
+# Dependencies: fzf
#
# Usage: launch [delay]
# delay is in seconds, if omitted launch waits for 1 sec
@@ -26,8 +26,6 @@ IFS=':'
get_selection() {
if which fzf >/dev/null 2>&1; then
{ IFS=':'; ls -H $PATH; } | sort | fzf
- elif which fzy >/dev/null 2>&1; then
- { IFS=':'; ls -H $PATH; } | sort | fzy
else
exit 1
fi
diff --git a/plugins/pskill b/plugins/pskill
index c23034f..063be35 100755
--- a/plugins/pskill
+++ b/plugins/pskill
@@ -2,7 +2,7 @@
# Description: Fuzzy list and kill a (zombie) process by name
#
-# Dependencies: fzf or fzy, ps
+# Dependencies: fzf, ps
#
# Note: To kill a zombie process enter "zombie"
#
@@ -24,8 +24,6 @@ if ! [ -z "$psname" ]; then
if which fzf >/dev/null 2>&1; then
fuzzy=fzf
- elif which fzy >/dev/null 2>&1; then
- fuzzy=fzy
else
exit 1
fi