New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent session and behavior of $NNN_PIPE
#777
Comments
For me the plugins you mentioned run file when I issue them within I would suggest the following:
The only thing that didn't work for me is:
I have to spend time on it. Can't be immediate. |
Piping to As we can run custom searches within |
I am thinking we should give more priority to the input stream rather than the stored session. find/grep syntax can be very complex and if the user is explicitly trying to list the results then that's what he wants to work. |
In fact the user can always finish what he wants to do with the list results and then use session -> restore to restore the "last session" if he needs. |
If an input stream is available, prioritize that over sessions. find/grep syntax can be very complex and can be scripted. On the contrary, sessions can be loaded at runtime and the persistent session can be "restored". An interesting use case is the listing is done in picker mode from a script and the user expects to "pick" some entries among the listed search results. Another important change is - if the user tries to load the "last session" explicitly by name instead of using the session option _restore_, we should not overwrite the "last session" ("@") before loading the it.
Please test and confirm it works as documented in the fix. |
More doc updates in commit b09adb4. |
Environment details (Put
x
in the checkbox along with the information)[x] Operating System: Ubuntu 20.04 LTS
[x] Desktop Environment: bspwm
[x] Terminal Emulator: st, kitty
[x] Shell: zsh
[x] Custom desktop opener (if applicable): nuke
[x] Program options used: export NNN_OPTS="cCdEfHorQSUx" (the S option is
relevant here)
[x] Configuration options set:
[x] Issue exists on
nnn
masterExact steps to reproduce the issue
I have noticed a couple of inconsistencies when using
nnn
with the persistent session option set.
For example, none of the plugins that use
$NNN_PIPE
to create a new context work as expected (
finder
,mimelist
etc.).Furthermore, with this option set, I can no longer start
nnn
with passing files at
stdin
. For example, I used to be able tosomething like
fd log_file.txt -0 | nnn
but this no longer works with the persistent option set.
I am not sure if this expected or even documented behavior,
but I sure hope that some of these inconsistencies can be
resolved, because I really do find the persistent option very
useful, and also heavily rely on plugins such as
finder
.Thanks,
Amanjit
The text was updated successfully, but these errors were encountered: