Closed jarun closed 4 years ago
https://github.com/jarun/nnn/blob/master/src/nnn.c#L3520-L3528
I guess this is the format you are looking for.
@joshaw At present if you pass a file path to nnn
it would just open that file and exit.
I've pushed a sample implementation at commit 56886922a62b39b43897988bdae289a47fc1026a to select the file if the file path is passed.
@0xACE We do not need to modify session handling for this. When a session is saved it will store the path and hovered file correctly which works as it should.
The commit above breaks our current behaviour where we open the file directly using opener if the path points to a file and nnn
exits. However, now nnn
will stay open with the file hovered.
@0xACE @KlzXS @leovilok do you guys think this new behaviour is acceptable? Consider the scenario where a file is opened from the browser and nnn
is set as the default file manager.
I think it makes sense if nnn
highlights the file if it has been given one in the path...
I like this new behaviour better. I think that it's out of the scope of nnn
to open the file directly.
OK. Then it stays!
Rolled from #483.
Ready for next release
NNN_FIFO
to write hovered file paths a previewer can readpreview-tabbed
: tabbed/xembed based file previewerpreview-tui
: simple TUI file previewer in tmux/xtermpreview-kitty
: preview using kitty terminal's capabilitiesnnn
finder
: find/fd/fzf/grep/ripgrep/fzf (in subtree) and list innnn
-S
[for disk usage, runnnn -T d
(see help)]NNN_SEL
to specify custom selection fileNNN_LOCKER
to specify locker programchdir()
on directory change-l
: number of lines to move on mouse scrollNNN_COLORS
overrideNO_COLOR
-P
: run plugin by key at startNNN_PIPE
usage by commands run as pluginNNN_PIPE
:<ctxcode><opcode><data>
(see plugins doc)ctxcode
to+
for smart context usage (next inactive, else current)getplugs
to fetch plugins by installed version ofnnn
mimelist
: list files by mime type in subtreebookmarks
: named bookmarks using symlinksnbak
: backupnnn
confignuke
adds lowdown as alternative markdown viewer@
shown in detail mode for symlink to dir/
-std=c11
Proposed features and tasks (up for grabs)
nnn
pluginsAnything else which would add value (please discuss in this thread).