aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-18 04:54:07 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-18 04:54:07 +0530
commit645f43355e887e8d24698fb70bd2ac8a50b191d4 (patch)
treee4f4170e960fae809545ad9fd3fb7f0ff2520b20 /src
parentc63fb28effb2fbae903928b9b9453974c6e96c9f (diff)
downloadnnn-645f43355e887e8d24698fb70bd2ac8a50b191d4.tar.gz
Fix #526: persistent session
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nnn.c b/src/nnn.c
index dcdafcc..b6460f9 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6245,6 +6245,9 @@ nochange:
break; // fallthrough
}
+ if (session && *session == '@' && !session[1])
+ save_session(TRUE, NULL);
+
/* CD on Quit */
/* In vim picker mode, clear selection and exit */
/* Picker mode: reset buffer or clear file */
@@ -6531,7 +6534,7 @@ static void usage(void)
" -r use advcpmv patched cp, mv\n"
" -R no rollover at edges\n"
" -s name load session by name\n"
- " -S du mode\n"
+ " -S persistent session\n"
" -t secs timeout to lock\n"
" -T key sort order [a/d/e/r/s/t/v]\n"
" -V show version\n"
@@ -6696,10 +6699,6 @@ int main(int argc, char *argv[])
case 'c':
cfg.cliopener = 1;
break;
- case 'S':
- cfg.blkorder = 1;
- nftw_fn = sum_bsize;
- blk_shift = ffs(S_BLKSIZE) - 1; // fallthrough
case 'd':
cfg.showdetail = 1;
printptr = &printent_long;
@@ -6770,6 +6769,9 @@ int main(int argc, char *argv[])
if (env_opts_id < 0)
session = optarg;
break;
+ case 'S':
+ session = "@";
+ break;
case 't':
if (env_opts_id < 0)
idletimeout = atoi(optarg);