aboutsummaryrefslogtreecommitdiffstats
path: root/misc/auto-completion/bash/nnn-completion.bash
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-18 02:35:05 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-18 02:35:05 +0530
commit85379a703bb698eb69447a1fc2a717e8f2813717 (patch)
tree50e0b2026abc8fbb28137899a075654bea80b061 /misc/auto-completion/bash/nnn-completion.bash
parentfc8c5b46b382998e4a25cf4d8bfd5fce4f0831c0 (diff)
downloadnnn-85379a703bb698eb69447a1fc2a717e8f2813717.tar.gz
Option -T to change default sort order
Diffstat (limited to 'misc/auto-completion/bash/nnn-completion.bash')
-rw-r--r--misc/auto-completion/bash/nnn-completion.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/auto-completion/bash/nnn-completion.bash b/misc/auto-completion/bash/nnn-completion.bash
index b6e370d..64dff7a 100644
--- a/misc/auto-completion/bash/nnn-completion.bash
+++ b/misc/auto-completion/bash/nnn-completion.bash
@@ -31,6 +31,7 @@ _nnn ()
-s
-S
-t
+ -T
-v
-V
-x
@@ -46,6 +47,9 @@ _nnn ()
COMPREPLY=( $(cd "$sessions_dir" && compgen -f -d -- "$cur") )
elif [[ $prev == -t ]]; then
return 1
+ elif [[ $prev == -T ]]; then
+ local keys=$(echo "a d e r s t v" | awk -v RS=' ' '{print $0}')
+ COMPREPLY=( $(compgen -W "$keys" -- "$cur") )
elif [[ $cur == -* ]]; then
COMPREPLY=( $(compgen -W "${opts[*]}" -- "$cur") )
else