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 master
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 to
something 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
For me the plugins you mentioned run file when I issue them within nnn.
I would suggest the following:
.nnn-plugin-helper, and install themThe only thing that didn't work for me is:
fd log_file.txt -0 | nnn
I have to spend time on it. Can't be immediate.
@leovilok and @KlzXS feel free to take a look.
Piping to nnn doesn't work because the input has to be parsed earlier than the session load and loading the session overwrites the context for the list results.
As we can run custom searches within nnn (last 2 examples here) I will document this case instead of adding unnecessary complexity to the code.
Doc updated: https://github.com/jarun/nnn/wiki/Troubleshooting#find--list-issues
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.
Please test and confirm it works as documented in the fix.
More doc updates in commit b09adb4654ea68e27b91a96b8e2bfd96a1378971.