mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Option n - nav as you type, V - version sort
This commit is contained in:
parent
06920d7d9d
commit
1003c0f8fc
|
@ -19,7 +19,6 @@ _nnn ()
|
||||||
-E
|
-E
|
||||||
-g
|
-g
|
||||||
-H
|
-H
|
||||||
-i
|
|
||||||
-K
|
-K
|
||||||
-n
|
-n
|
||||||
-o
|
-o
|
||||||
|
@ -31,6 +30,7 @@ _nnn ()
|
||||||
-S
|
-S
|
||||||
-t
|
-t
|
||||||
-v
|
-v
|
||||||
|
-V
|
||||||
-x
|
-x
|
||||||
-h
|
-h
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,9 +18,8 @@ complete -c nnn -s d -d 'start in detail mode'
|
||||||
complete -c nnn -s E -d 'use EDITOR for undetached edits'
|
complete -c nnn -s E -d 'use EDITOR for undetached edits'
|
||||||
complete -c nnn -s g -d 'regex filters'
|
complete -c nnn -s g -d 'regex filters'
|
||||||
complete -c nnn -s H -d 'show hidden files'
|
complete -c nnn -s H -d 'show hidden files'
|
||||||
complete -c nnn -s i -d 'start in navigate-as-you-type mode'
|
|
||||||
complete -c nnn -s K -d 'detect key collision'
|
complete -c nnn -s K -d 'detect key collision'
|
||||||
complete -c nnn -s n -d 'use version compare to sort files'
|
complete -c nnn -s n -d 'start in navigate-as-you-type mode'
|
||||||
complete -c nnn -s o -d 'open files only on Enter'
|
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 'copy selection to file' -a '-\tstdout'
|
||||||
complete -c nnn -s Q -d 'disable quit confirmation'
|
complete -c nnn -s Q -d 'disable quit confirmation'
|
||||||
|
@ -30,5 +29,6 @@ complete -c nnn -s s -r -d 'load session by name' -x -a '@\t"last session" (ls $
|
||||||
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 t -d 'disable dir auto-select'
|
||||||
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 V -d 'use version compare to sort files'
|
||||||
complete -c nnn -s x -d 'notis, sel to system clipboard'
|
complete -c nnn -s x -d 'notis, sel to system clipboard'
|
||||||
complete -c nnn -s h -d 'show program help'
|
complete -c nnn -s h -d 'show program help'
|
||||||
|
|
|
@ -16,9 +16,8 @@ args=(
|
||||||
'(-E)-E[use EDITOR for undetached edits]'
|
'(-E)-E[use EDITOR for undetached edits]'
|
||||||
'(-g)-g[regex filters]'
|
'(-g)-g[regex filters]'
|
||||||
'(-H)-H[show hidden files]'
|
'(-H)-H[show hidden files]'
|
||||||
'(-i)-i[start in navigate-as-you-type mode]'
|
|
||||||
'(-K)-K[detect key collision]'
|
'(-K)-K[detect key collision]'
|
||||||
'(-n)-n[use version compare to sort files]'
|
'(-n)-n[start in navigate-as-you-type mode]'
|
||||||
'(-o)-o[open files only on Enter]'
|
'(-o)-o[open files only on Enter]'
|
||||||
'(-p)-p[copy selection to file]:file name'
|
'(-p)-p[copy selection to file]:file name'
|
||||||
'(-Q)-Q[disable quit confirmation]'
|
'(-Q)-Q[disable quit confirmation]'
|
||||||
|
@ -28,6 +27,7 @@ args=(
|
||||||
'(-S)-S[start in disk usage analyzer mode]'
|
'(-S)-S[start in disk usage analyzer mode]'
|
||||||
'(-t)-t[disable dir auto-select]'
|
'(-t)-t[disable dir auto-select]'
|
||||||
'(-v)-v[show program version and exit]'
|
'(-v)-v[show program version and exit]'
|
||||||
|
'(-V)-V[use version compare to sort files]'
|
||||||
'(-x)-x[notis, sel to system clipboard]'
|
'(-x)-x[notis, sel to system clipboard]'
|
||||||
'(-h)-h[show program help]'
|
'(-h)-h[show program help]'
|
||||||
'*:filename:_files'
|
'*:filename:_files'
|
||||||
|
|
10
nnn.1
10
nnn.1
|
@ -13,7 +13,6 @@
|
||||||
.Op Ar -E
|
.Op Ar -E
|
||||||
.Op Ar -g
|
.Op Ar -g
|
||||||
.Op Ar -H
|
.Op Ar -H
|
||||||
.Op Ar -i
|
|
||||||
.Op Ar -K
|
.Op Ar -K
|
||||||
.Op Ar -n
|
.Op Ar -n
|
||||||
.Op Ar -p file
|
.Op Ar -p file
|
||||||
|
@ -23,6 +22,7 @@
|
||||||
.Op Ar -s name
|
.Op Ar -s name
|
||||||
.Op Ar -S
|
.Op Ar -S
|
||||||
.Op Ar -v
|
.Op Ar -v
|
||||||
|
.Op Ar -V
|
||||||
.Op Ar -x
|
.Op Ar -x
|
||||||
.Op Ar -h
|
.Op Ar -h
|
||||||
.Op Ar PATH
|
.Op Ar PATH
|
||||||
|
@ -65,14 +65,11 @@ supports the following options:
|
||||||
.Fl H
|
.Fl H
|
||||||
show hidden files
|
show hidden files
|
||||||
.Pp
|
.Pp
|
||||||
.Fl i
|
|
||||||
start in navigate-as-you-type mode
|
|
||||||
.Pp
|
|
||||||
.Fl K
|
.Fl K
|
||||||
test for keybind collision
|
test for keybind collision
|
||||||
.Pp
|
.Pp
|
||||||
.Fl n
|
.Fl n
|
||||||
use case-insensitive version compare to sort files
|
start in navigate-as-you-type mode
|
||||||
.Pp
|
.Pp
|
||||||
.Fl o
|
.Fl o
|
||||||
open files only on Enter key
|
open files only on Enter key
|
||||||
|
@ -101,6 +98,9 @@ supports the following options:
|
||||||
.Fl v
|
.Fl v
|
||||||
show version and exit
|
show version and exit
|
||||||
.Pp
|
.Pp
|
||||||
|
.Fl V
|
||||||
|
use case-insensitive version compare to sort files
|
||||||
|
.Pp
|
||||||
.Fl x
|
.Fl x
|
||||||
show notis on selection cp, mv, rm completion; copy path to system clipboard on select
|
show notis on selection cp, mv, rm completion; copy path to system clipboard on select
|
||||||
.Pp
|
.Pp
|
||||||
|
|
14
src/nnn.c
14
src/nnn.c
|
@ -5495,9 +5495,8 @@ static void usage(void)
|
||||||
" -E use EDITOR for undetached edits\n"
|
" -E use EDITOR for undetached edits\n"
|
||||||
" -g regex filters [default: string]\n"
|
" -g regex filters [default: string]\n"
|
||||||
" -H show hidden files\n"
|
" -H show hidden files\n"
|
||||||
" -i nav-as-you-type mode\n"
|
|
||||||
" -K detect key collision\n"
|
" -K detect key collision\n"
|
||||||
" -n version sort\n"
|
" -n nav-as-you-type mode\n"
|
||||||
" -o open files on Enter\n"
|
" -o open files on Enter\n"
|
||||||
" -p file selection file [stdout if '-']\n"
|
" -p file selection file [stdout if '-']\n"
|
||||||
" -Q no quit confirmation\n"
|
" -Q no quit confirmation\n"
|
||||||
|
@ -5507,6 +5506,7 @@ static void usage(void)
|
||||||
" -S du mode\n"
|
" -S du mode\n"
|
||||||
" -t no dir auto-select\n"
|
" -t no dir auto-select\n"
|
||||||
" -v show version\n"
|
" -v show version\n"
|
||||||
|
" -V version sort\n"
|
||||||
" -x notis, sel to system clipboard\n"
|
" -x notis, sel to system clipboard\n"
|
||||||
" -h show help\n\n"
|
" -h show help\n\n"
|
||||||
"v%s\n%s\n", __func__, VERSION, GENERAL_INFO);
|
"v%s\n%s\n", __func__, VERSION, GENERAL_INFO);
|
||||||
|
@ -5650,7 +5650,7 @@ int main(int argc, char *argv[])
|
||||||
bool progress = FALSE;
|
bool progress = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "HSKiab:cdEgnop:QrRs:tvxh")) != -1) {
|
while ((opt = getopt(argc, argv, "HSKab:cdEgnop:QrRs:tvVxh")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'S':
|
case 'S':
|
||||||
cfg.blkorder = 1;
|
cfg.blkorder = 1;
|
||||||
|
@ -5660,9 +5660,6 @@ int main(int argc, char *argv[])
|
||||||
cfg.showdetail = 1;
|
cfg.showdetail = 1;
|
||||||
printptr = &printent_long;
|
printptr = &printent_long;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
|
||||||
cfg.filtermode = 1;
|
|
||||||
break;
|
|
||||||
case 'a':
|
case 'a':
|
||||||
cfg.mtime = 0;
|
cfg.mtime = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -5683,7 +5680,7 @@ int main(int argc, char *argv[])
|
||||||
cfg.showhidden = 1;
|
cfg.showhidden = 1;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
cmpfn = &xstrverscasecmp;
|
cfg.filtermode = 1;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
cfg.nonavopen = 1;
|
cfg.nonavopen = 1;
|
||||||
|
@ -5728,6 +5725,9 @@ int main(int argc, char *argv[])
|
||||||
case 'v':
|
case 'v':
|
||||||
fprintf(stdout, "%s\n", VERSION);
|
fprintf(stdout, "%s\n", VERSION);
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
|
case 'V':
|
||||||
|
cmpfn = &xstrverscasecmp;
|
||||||
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
cfg.x11 = 1;
|
cfg.x11 = 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue