aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-09 03:34:10 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-09 03:34:10 +0530
commit7bf7894022d53e9f98bb11fc8f42bc56b62ae8b4 (patch)
tree9b0c33bc7275696f1f4ef13f0897a749bbed397b
parent0492fa385d729565f7adb903e48935af6b635a6d (diff)
downloadnnn-7bf7894022d53e9f98bb11fc8f42bc56b62ae8b4.tar.gz
Use option -A to disable dir auto-select
-rw-r--r--misc/auto-completion/bash/nnn-completion.bash2
-rw-r--r--misc/auto-completion/fish/nnn.fish2
-rw-r--r--misc/auto-completion/zsh/_nnn2
-rw-r--r--nnn.17
-rw-r--r--src/nnn.c10
5 files changed, 12 insertions, 11 deletions
diff --git a/misc/auto-completion/bash/nnn-completion.bash b/misc/auto-completion/bash/nnn-completion.bash
index 86102bd..74349e6 100644
--- a/misc/auto-completion/bash/nnn-completion.bash
+++ b/misc/auto-completion/bash/nnn-completion.bash
@@ -13,6 +13,7 @@ _nnn ()
local -a opts
opts=(
-a
+ -A
-b
-c
-d
@@ -28,7 +29,6 @@ _nnn ()
-R
-s
-S
- -t
-v
-V
-x
diff --git a/misc/auto-completion/fish/nnn.fish b/misc/auto-completion/fish/nnn.fish
index 96348bd..9358882 100644
--- a/misc/auto-completion/fish/nnn.fish
+++ b/misc/auto-completion/fish/nnn.fish
@@ -12,6 +12,7 @@ else
end
complete -c nnn -s a -d 'use access time'
+complete -c nnn -s A -d 'disable dir auto-select'
complete -c nnn -s b -r -d 'bookmark key to open' -x -a '(echo $NNN_BMS | awk -F: -v RS=\; \'{print $1"\t"$2}\')'
complete -c nnn -s c -d 'cli-only opener'
complete -c nnn -s d -d 'start in detail mode'
@@ -27,7 +28,6 @@ complete -c nnn -s r -d 'show cp, mv progress (Linux-only)'
complete -c nnn -s R -d 'disable rollover at edges'
complete -c nnn -s s -r -d 'load session by name' -x -a '@\t"last session" (ls $sessions_dir)'
complete -c nnn -s S -d 'start in disk usage analyzer mode'
-complete -c nnn -s t -d 'disable dir auto-select'
complete -c nnn -s v -d 'use version compare to sort files'
complete -c nnn -s V -d 'show program version and exit'
complete -c nnn -s x -d 'notis, sel to system clipboard'
diff --git a/misc/auto-completion/zsh/_nnn b/misc/auto-completion/zsh/_nnn
index 7aa9ba4..d36d6ee 100644
--- a/misc/auto-completion/zsh/_nnn
+++ b/misc/auto-completion/zsh/_nnn
@@ -10,6 +10,7 @@ setopt localoptions noshwordsplit noksharrays
local -a args
args=(
'(-a)-a[use access time]'
+ '(-A)-A[disable dir auto-select]'
'(-b)-b[bookmark key to open]:key char'
'(-c)-c[cli-only opener]'
'(-d)-d[start in detail mode]'
@@ -25,7 +26,6 @@ args=(
'(-R)-R[disable rollover at edges]'
'(-s)-s[load session]:session name'
'(-S)-S[start in disk usage analyzer mode]'
- '(-t)-t[disable dir auto-select]'
'(-v)-v[use version compare to sort files]'
'(-V)-V[show program version and exit]'
'(-x)-x[notis, sel to system clipboard]'
diff --git a/nnn.1 b/nnn.1
index ee555f6..d6725a6 100644
--- a/nnn.1
+++ b/nnn.1
@@ -7,6 +7,7 @@
.Sh SYNOPSIS
.Nm
.Op Ar -a
+.Op Ar -A
.Op Ar -b key
.Op Ar -c
.Op Ar -d
@@ -47,6 +48,9 @@ supports the following options:
.Fl a
use access time for all operations (default: modification time)
.Pp
+.Fl A
+ disable directory auto-select in navigate-as-you-type mode
+.Pp
.Fl "b key"
specify bookmark key to open
.Pp
@@ -92,9 +96,6 @@ supports the following options:
.Fl S
start in disk usage analyzer mode
.Pp
-.Fl t
- disable directory auto-select in navigate-as-you-type mode
-.Pp
.Fl v
use case-insensitive version compare to sort files
.Pp
diff --git a/src/nnn.c b/src/nnn.c
index bc05eca..815d5d9 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5506,6 +5506,7 @@ static void usage(void)
" PATH start dir [default: .]\n\n"
"optional args:\n"
" -a use access time\n"
+ " -A no dir auto-select\n"
" -b key open bookmark key\n"
" -c cli-only opener\n"
" -d detail mode\n"
@@ -5521,7 +5522,6 @@ static void usage(void)
" -R no rollover at edges\n"
" -s name load session by name\n"
" -S du mode\n"
- " -t no dir auto-select\n"
" -v version sort\n"
" -V show version\n"
" -x notis, sel to system clipboard\n"
@@ -5667,7 +5667,7 @@ int main(int argc, char *argv[])
bool progress = FALSE;
#endif
- while ((opt = getopt(argc, argv, "HSKab:cdEgnop:QrRs:tvVxh")) != -1) {
+ while ((opt = getopt(argc, argv, "HSKaAb:cdEgnop:QrRs:vVxh")) != -1) {
switch (opt) {
case 'S':
cfg.blkorder = 1;
@@ -5680,6 +5680,9 @@ int main(int argc, char *argv[])
case 'a':
cfg.mtime = 0;
break;
+ case 'A':
+ cfg.autoselect = 0;
+ break;
case 'b':
arg = optarg;
break;
@@ -5733,9 +5736,6 @@ int main(int argc, char *argv[])
case 's':
session = optarg;
break;
- case 't':
- cfg.autoselect = 0;
- break;
case 'K':
check_key_collision();
return _SUCCESS;