diff options
Diffstat (limited to 'misc/auto-completion')
-rw-r--r-- | misc/auto-completion/bash/nnn-completion.bash | 4 | ||||
-rw-r--r-- | misc/auto-completion/fish/nnn.fish | 1 | ||||
-rw-r--r-- | misc/auto-completion/zsh/_nnn | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/misc/auto-completion/bash/nnn-completion.bash b/misc/auto-completion/bash/nnn-completion.bash index eeb1156..e8f2548 100644 --- a/misc/auto-completion/bash/nnn-completion.bash +++ b/misc/auto-completion/bash/nnn-completion.bash @@ -27,6 +27,7 @@ _nnn () -n -o -p + -P -Q -r -R @@ -45,6 +46,9 @@ _nnn () return 1 elif [[ $prev == -p ]]; then COMPREPLY=( $(compgen -f -d -- "$cur") ) + elif [[ $prev == -P ]]; then + local plugins=$(echo $NNN_PLUG | awk -F: -v RS=\; '{print $1}') + COMPREPLY=( $(compgen -W "$plugins" -- "$cur") ) elif [[ $prev == -s ]]; then local sessions_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/sessions COMPREPLY=( $(cd "$sessions_dir" && compgen -f -d -- "$cur") ) diff --git a/misc/auto-completion/fish/nnn.fish b/misc/auto-completion/fish/nnn.fish index 65ab030..1b6455b 100644 --- a/misc/auto-completion/fish/nnn.fish +++ b/misc/auto-completion/fish/nnn.fish @@ -26,6 +26,7 @@ complete -c nnn -s l -r -d 'lines to move per scroll' complete -c nnn -s n -d 'start in type-to-nav mode' complete -c nnn -s o -d 'open files only on Enter' complete -c nnn -s p -r -d 'copy selection to file' -a '-\tstdout' +complete -c nnn -s P -r -d 'plugin key to run' -x -a '(echo $NNN_PLUG | awk -F: -v RS=\; \'{print $1"\t"$2}\')' complete -c nnn -s Q -d 'disable quit confirmation' complete -c nnn -s r -d 'show cp, mv progress (Linux-only)' complete -c nnn -s R -d 'disable rollover at edges' diff --git a/misc/auto-completion/zsh/_nnn b/misc/auto-completion/zsh/_nnn index 4b40306..441589a 100644 --- a/misc/auto-completion/zsh/_nnn +++ b/misc/auto-completion/zsh/_nnn @@ -24,6 +24,7 @@ args=( '(-n)-n[start in type-to-nav mode]' '(-o)-o[open files only on Enter]' '(-p)-p[copy selection to file]:file name' + '(-P)-P[plugin key to runn]:key char' '(-Q)-Q[disable quit confirmation]' '(-r)-r[show cp, mv progress (Linux-only)]' '(-R)-R[disable rollover at edges]' |