jarun / nnn

n³ The unorthodox terminal file manager
BSD 2-Clause "Simplified" License
19.4k stars 763 forks source link

Session does not store configuration settings (?) #1926

Closed chrysle closed 2 months ago

chrysle commented 2 months ago

The documentation states that nnn stores the current configuration settings within a session object:

A session stores the settings and contexts.

https://github.com/jarun/nnn/wiki/concepts#sessions

Unfortunately, I seem to be unable to make this work with the latest version (5.0).

Environment details (Put x in the checkbox along with the information)

Exact steps to reproduce the issue

$ NNN_TRASH=2 nnn
# save the session
$ ls .config/nnn/sessions/
total 4.0K
-rw------- 1 user user 240 Sep  5 16:18 the-session
$ nnn -s the-session
# configuration setting not active
jarun commented 2 months ago

sessions save the settings, not the config options. Please refer to the structure settings.

chrysle commented 2 months ago

Ah, I see, sorry for mixing these up. Probably this should be documented a bit better.

Besides, have you thought of extending session objects to store config? Of course, it's possible for the user to add this to the own shell config file and you probably don't want to bloat nnn that way. I enjoy the easy usage!

jarun commented 2 months ago

Please have a look at the plugin nbak.