* Refactor fifo code and add explorer
* add explorer option and flag
* notify explorer fifo on selection
* close explorer fifo file descriptor
* Try to create explorer fifo if doesn't exist
This doesn't quite work
* Allow uncreated fifos
* delete persistence fifo on cleanup
with correct formatting
Co-authored-by: luukvbaal <31730729+luukvbaal@users.noreply.github.com>
* Work correctly with NOFIFO
* Refactor variable names
* fix
* Use -X flag for explorer mode
* Update manpage with explorer mode
Co-authored-by: luukvbaal <31730729+luukvbaal@users.noreply.github.com>
Plugins like fzopen have the capability to pick files.
This comes handy if nnn is executing as a file picker.
This is a 2-way communication:
- nnn sends the picker output file to plugin ("-" for stdout)
- the plugin tells nnn if it has overwritten the output file
If you have selected some files, you intend to work on them. Also, this prompt
expects <kbd>c</kbd> / <kbd>s</kbd> which should cancel the next prompt in the
delete workflow. Rest of the three workflows are non-fatal.
Benefits of removing this option:
- code reduction
- one less step in the relevant workflows (more than one prompt feels dragged)
This prompt shows in the following workflows:
- delete: users have explicitly requested to prefer sel over current
- batch rename: key <kbd>^R</kbd> renames a single file
- archive: in most of the cases the user would want to archive the selection
- create sym/hard link: not a frequently used workflow (in general)
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.