Browse Source

Option -S: start in disk usage analyzer mode

master
Arun Prakash Jana 7 years ago
parent
commit
971895e873
No known key found for this signature in database GPG Key ID: A75979F35C080412
3 changed files with 12 additions and 6 deletions
  1. +4
    -3
      README.md
  2. +4
    -1
      nnn.1
  3. +4
    -2
      nnn.c

+ 4
- 3
README.md View File

@@ -162,11 +162,12 @@ Add the following to your shell's rc file for the best experience:


### Usage ### Usage


Start nnn (default: current directory):
Start nnn (default dir: current directory):


$ nnn [-d] [-v] [path_to_dir]
$ nnn [-d] [-S] [-v] [dir]


-d: open in detail view mode
-d: start in detail view mode
-S: start in disk usage analyzer mode
-v: show version and exit -v: show version and exit
`>` indicates the currently selected entry in nnn. `>` indicates the currently selected entry in nnn.




+ 4
- 1
nnn.1 View File

@@ -85,7 +85,10 @@ directory you came out of.
supports the following options: supports the following options:
.Pp .Pp
.Fl d .Fl d
open in detail view mode
start in detail view mode
.Pp
.Fl S
start in disk usage analyzer mode
.Pp .Pp
.Fl v .Fl v
show version and exit show version and exit


+ 4
- 2
nnn.c View File

@@ -1578,7 +1578,7 @@ nochange:
static void static void
usage(void) usage(void)
{ {
fprintf(stderr, "usage: nnn [-d] [-v] [dir]\n");
fprintf(stderr, "usage: nnn [-d] [-S] [-v] [dir]\n");
exit(1); exit(1);
} }


@@ -1598,8 +1598,10 @@ main(int argc, char *argv[])
if (argc > 3) if (argc > 3)
usage(); usage();


while ((opt = getopt(argc, argv, "dv")) != -1) {
while ((opt = getopt(argc, argv, "dSv")) != -1) {
switch (opt) { switch (opt) {
case 'S':
bsizeorder = 1;
case 'd': case 'd':
/* Open in detail mode, if set */ /* Open in detail mode, if set */
showdetail = 1; showdetail = 1;


Loading…
Cancel
Save