-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
ToDo list #506
Comments
Feature RequestHi, thank you so much for this wonderful command line tool. Is there any plan to enhance Line 13 in a8da997
Let me know what you think. Feel free to send a PR |
Yes sure, please raise a PR. |
Got a question: Shouldn't both FZF_DEFAULT_COMMAND and FZF_DEFAULT_OPTS work if they are defined? |
Not at this moment. It only reads Note: both already defined |
Shouldn't that be fixed in fzf instead of the plugin? |
It works if I run outside |
I see. See if it can be fixed. |
Is the -c parameter limited to nuke ? |
No, you can use it with any custom cli opener. Yes, you'll have to specify the path to the custom opener in |
Hmm maybe I'm doing something wrong. I've attached a short screen recording. |
|
I set the NNN_OPENER env var using that alias I made for nnn. It's in the upper right terminal. |
In your case:
Then you have:
So images will open in chromium. What is your expectation? If you do NOT want to open images using chromium see this: https://unix.stackexchange.com/a/59088/164910
If you want to set
There's no issue with What application do you want to open images in? |
Forgive me but what is the use case for "-c" if some file will open in a graphical application regardless if the NNN_OPENER is set or not ? I honestly expected nnn -c to just not open a image in chromium because chromium is a graphical application. |
Your opener is What open Yes, |
I see. Thank you. What does it actually do ? Because in the man page it says this:
EDIT: Saw your edit. Thanks again. |
I added more details in my earlier answer.
It doesn't mean that the option forces opener to open files in CLI utilities only. It means that when the user sets this flag he is indicating to Anyway, I see why it's confusing. I will update it. |
Firstly, can you elaborate on this feature?
I wrote myself a plugin that seems to work pretty well: If my plugin looks like something that’s usable and what you envisioned, I could write it in such a way that it removes the I have a lot of ideas for features that I think could be useful:
|
This is for pre-defined filters a user can set like NNN_BMS or NNN_PLUG and apply. The implementation should follow the current ones.
Can you please explain what it does? And in which workflow would it replace fzf?
That would be very useful indeed.
That's a lot of disk writes unless your /tmp is tmpfs (maybe we could have a keybind to do that explicitly?). |
@toddyamakawa can you also take a look at my request at #520 (comment)? |
Ah, I misunderstood what the feature does. I do not have a predefined filter.
I have a bunch of symlinks I use in my
I personally think that Does
Good point, I didn't think about that. I guess it would be better to map a key binding or a flag. |
Why not create a file with the paths?
Plugin
We can't drop the listing plugins feature. And this also affects run-cmd-as-plugin, now when we have such a command Also, we do not run commands with
Not having a config file and not having a config dir are different. We still need to store sessions, selection file and so on...
It does. |
I guess my plugin on the surface looks like a duplicate of the
I think the one limitation with the built-in bookmarks is you have to remember which letter is mapped to which bookmark or you have to look it up first with
The mappings would be different though.
Good to know. Thanks! Anyways, I understand everything you're saying. It does feel like having a config directory sort of conflicts with not having a config file and that setting things with environment variables sort of conflicts with having a config directory, but everything does work really well together. |
Have entries in the file as: name -> path
Yes, I am OK with adding a plugin that works as the fallback. And we won't have z dep either. I would love it if we could get rid of the fzf dep too.
Let's not have this. We are well-provisioned with the current mechanism.
The config file isn't there because we don't want to load and read a file from disk every time we start. There's no such issue with dirs. |
Also, see my dev-room note on the backup thing. We can do those because we are well organised. Maybe we should have the bookmark file in config dir so that also gets backed up without any additional effort. |
But to do that, we need to get the plugin work without fzf or have a way to handle if fzf is not installed. |
I've never looked at
I didn't even think about that. Thanks for the explanation |
In the current state, is possible to write a plugin to display file icons using a patched font? |
@RibalGZ we do not want to make The main goal of |
Again, it's related to being able to determine information in more ways than just reading file names... Now i don't find icons necessary, but thumbnails help a lot with pictures... but I guess a image browser fits better for this goal, considering we are in the terminal... So really: it's not exactly necessary in @RibalGZ I asked in the private dev-discussion thread:
This would allow a seperate script to run along side Didn't receive an answer, but I may add it on my local copy in the future as I find this useful, as it allows you to virtually add extra columns to |
I missed this. That would be too much data written on each hover. Yes, it's probably better to maintain in a fork if you fin it useful. You can refer to the code for handling |
@RibalGZ I checked the feasibility. It would need a regex match per file. Too heavy for |
We don't need to do that in I just wondered if something like that could be achieved via plugins in the current state of the project.
I agree, thank you! |
What about adding support for specifying custom colors for file entry according to the file name ? Using something like |
As jarun described, the method of detecting it would increase the complexity of Have you tried filtering by search? or sorting by file extension? (as I was writing this) Wait a minute, we already have |
@0xACE is right. We would like to avoid a regex/string compare per file, which color codes would warrant. You'll have to understand that Sort by extension is a specific case. As @0xACE has suggested, feel free to patch. |
This is intentional. Tells you the exact file name and looks better. |
That is a pleasantly nice setup you have @gyvess (referring to the ricing)
This should fix the
And that should do the same for the Again I didn't test these, have fun. |
@0xACE what is the problem with not highlighting the / and the prefix space? |
No problem whatsoever, it was poor wording from me. imho. I was trying to be quick with writing my post... It grinds down to personal taste and behavior. Imho tough: there is no other user experience where Tbh, this "issue" is of such minor cause that it is not worth delving into, unless it's considered a problem by others. So for now let it rest. We both know it is easily reversible. I'll back you up in the public branch, if this becomes a problem |
Thanks, I thought I broke something in user experience. Highlighting the file name seemed logical. |
I have a feature request / request for help (perhaps this is already possible with plugins, but I haven't been able to achieve it yet). I use "picker" ( It's sort of like a reverse Edit: I'm sure it works differently, but the same as how navigating up to the parent directory puts the cursor on the directory that you were just in - I'd like to do that but with files too. |
@joshaw your answer is sessions. Have a saved session with that file hovered and use |
Thank you! I'll try using sessions. I'm guessing it would work to dynamically create the session file in |
Yes, we try our best to keep the workflows simple for users however complex they are internally. |
Is there any documentation on the session file format? I can't find any and am currently just getting either a segfault or "failed" flashing up and the session file has no effect. Thanks for your help |
You don't need to know the session file format or create one manually. You need to save a session when you are running The documentation is available in the man page as well as in the wiki - https://github.com/jarun/nnn/wiki#sessions |
I'd like to start from an artbitrary file though, so can't create a session file beforehand. I can pass the directory so that nnn starts in the right folder, but I'd like to start at the right file as well. My workflow is
|
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 I've pushed a sample implementation at commit 5688692 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 @0xACE @KlzXS @leovilok do you guys think this new behaviour is acceptable? Consider the scenario where a file is opened from the browser and |
I think it makes sense if |
I like this new behaviour better. I think that it's out of the scope of |
OK. Then it stays! |
This works brilliantly. Thanks very much |
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).
The text was updated successfully, but these errors were encountered: