mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Use option -A to disable dir auto-select
This commit is contained in:
parent
0492fa385d
commit
7bf7894022
|
@ -13,6 +13,7 @@ _nnn ()
|
||||||
local -a opts
|
local -a opts
|
||||||
opts=(
|
opts=(
|
||||||
-a
|
-a
|
||||||
|
-A
|
||||||
-b
|
-b
|
||||||
-c
|
-c
|
||||||
-d
|
-d
|
||||||
|
@ -28,7 +29,6 @@ _nnn ()
|
||||||
-R
|
-R
|
||||||
-s
|
-s
|
||||||
-S
|
-S
|
||||||
-t
|
|
||||||
-v
|
-v
|
||||||
-V
|
-V
|
||||||
-x
|
-x
|
||||||
|
|
|
@ -12,6 +12,7 @@ else
|
||||||
end
|
end
|
||||||
|
|
||||||
complete -c nnn -s a -d 'use access time'
|
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 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 c -d 'cli-only opener'
|
||||||
complete -c nnn -s d -d 'start in detail mode'
|
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 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 -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 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 'use version compare to sort files'
|
||||||
complete -c nnn -s V -d 'show program version and exit'
|
complete -c nnn -s V -d 'show program version and exit'
|
||||||
complete -c nnn -s x -d 'notis, sel to system clipboard'
|
complete -c nnn -s x -d 'notis, sel to system clipboard'
|
||||||
|
|
|
@ -10,6 +10,7 @@ setopt localoptions noshwordsplit noksharrays
|
||||||
local -a args
|
local -a args
|
||||||
args=(
|
args=(
|
||||||
'(-a)-a[use access time]'
|
'(-a)-a[use access time]'
|
||||||
|
'(-A)-A[disable dir auto-select]'
|
||||||
'(-b)-b[bookmark key to open]:key char'
|
'(-b)-b[bookmark key to open]:key char'
|
||||||
'(-c)-c[cli-only opener]'
|
'(-c)-c[cli-only opener]'
|
||||||
'(-d)-d[start in detail mode]'
|
'(-d)-d[start in detail mode]'
|
||||||
|
@ -25,7 +26,6 @@ args=(
|
||||||
'(-R)-R[disable rollover at edges]'
|
'(-R)-R[disable rollover at edges]'
|
||||||
'(-s)-s[load session]:session name'
|
'(-s)-s[load session]:session name'
|
||||||
'(-S)-S[start in disk usage analyzer mode]'
|
'(-S)-S[start in disk usage analyzer mode]'
|
||||||
'(-t)-t[disable dir auto-select]'
|
|
||||||
'(-v)-v[use version compare to sort files]'
|
'(-v)-v[use version compare to sort files]'
|
||||||
'(-V)-V[show program version and exit]'
|
'(-V)-V[show program version and exit]'
|
||||||
'(-x)-x[notis, sel to system clipboard]'
|
'(-x)-x[notis, sel to system clipboard]'
|
||||||
|
|
7
nnn.1
7
nnn.1
|
@ -7,6 +7,7 @@
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Ar -a
|
.Op Ar -a
|
||||||
|
.Op Ar -A
|
||||||
.Op Ar -b key
|
.Op Ar -b key
|
||||||
.Op Ar -c
|
.Op Ar -c
|
||||||
.Op Ar -d
|
.Op Ar -d
|
||||||
|
@ -47,6 +48,9 @@ supports the following options:
|
||||||
.Fl a
|
.Fl a
|
||||||
use access time for all operations (default: modification time)
|
use access time for all operations (default: modification time)
|
||||||
.Pp
|
.Pp
|
||||||
|
.Fl A
|
||||||
|
disable directory auto-select in navigate-as-you-type mode
|
||||||
|
.Pp
|
||||||
.Fl "b key"
|
.Fl "b key"
|
||||||
specify bookmark key to open
|
specify bookmark key to open
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -92,9 +96,6 @@ supports the following options:
|
||||||
.Fl S
|
.Fl S
|
||||||
start in disk usage analyzer mode
|
start in disk usage analyzer mode
|
||||||
.Pp
|
.Pp
|
||||||
.Fl t
|
|
||||||
disable directory auto-select in navigate-as-you-type mode
|
|
||||||
.Pp
|
|
||||||
.Fl v
|
.Fl v
|
||||||
use case-insensitive version compare to sort files
|
use case-insensitive version compare to sort files
|
||||||
.Pp
|
.Pp
|
||||||
|
|
10
src/nnn.c
10
src/nnn.c
|
@ -5506,6 +5506,7 @@ static void usage(void)
|
||||||
" PATH start dir [default: .]\n\n"
|
" PATH start dir [default: .]\n\n"
|
||||||
"optional args:\n"
|
"optional args:\n"
|
||||||
" -a use access time\n"
|
" -a use access time\n"
|
||||||
|
" -A no dir auto-select\n"
|
||||||
" -b key open bookmark key\n"
|
" -b key open bookmark key\n"
|
||||||
" -c cli-only opener\n"
|
" -c cli-only opener\n"
|
||||||
" -d detail mode\n"
|
" -d detail mode\n"
|
||||||
|
@ -5521,7 +5522,6 @@ static void usage(void)
|
||||||
" -R no rollover at edges\n"
|
" -R no rollover at edges\n"
|
||||||
" -s name load session by name\n"
|
" -s name load session by name\n"
|
||||||
" -S du mode\n"
|
" -S du mode\n"
|
||||||
" -t no dir auto-select\n"
|
|
||||||
" -v version sort\n"
|
" -v version sort\n"
|
||||||
" -V show version\n"
|
" -V show version\n"
|
||||||
" -x notis, sel to system clipboard\n"
|
" -x notis, sel to system clipboard\n"
|
||||||
|
@ -5667,7 +5667,7 @@ int main(int argc, char *argv[])
|
||||||
bool progress = FALSE;
|
bool progress = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "HSKab:cdEgnop:QrRs:tvVxh")) != -1) {
|
while ((opt = getopt(argc, argv, "HSKaAb:cdEgnop:QrRs:vVxh")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'S':
|
case 'S':
|
||||||
cfg.blkorder = 1;
|
cfg.blkorder = 1;
|
||||||
|
@ -5680,6 +5680,9 @@ int main(int argc, char *argv[])
|
||||||
case 'a':
|
case 'a':
|
||||||
cfg.mtime = 0;
|
cfg.mtime = 0;
|
||||||
break;
|
break;
|
||||||
|
case 'A':
|
||||||
|
cfg.autoselect = 0;
|
||||||
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
arg = optarg;
|
arg = optarg;
|
||||||
break;
|
break;
|
||||||
|
@ -5733,9 +5736,6 @@ int main(int argc, char *argv[])
|
||||||
case 's':
|
case 's':
|
||||||
session = optarg;
|
session = optarg;
|
||||||
break;
|
break;
|
||||||
case 't':
|
|
||||||
cfg.autoselect = 0;
|
|
||||||
break;
|
|
||||||
case 'K':
|
case 'K':
|
||||||
check_key_collision();
|
check_key_collision();
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue