jarun / nnn

n³ The unorthodox terminal file manager
BSD 2-Clause "Simplified" License
19.43k stars 765 forks source link

ToDo list #483

Closed jarun closed 4 years ago

jarun commented 4 years ago

Rolled from #472.

For next release

Proposed features and tasks (up for grabs)

Anything else which would add value (please discuss in this thread).

mkrusemark commented 4 years ago

Please consider configuration of colors like dircolors. Blue on black is really bad ;-)

jarun commented 4 years ago

@mkrusemark you can change the default color easily: https://github.com/jarun/nnn/wiki#context-color

mkrusemark commented 4 years ago

It's not only about the context but directory and file names. A functionality like dircolors would be highly appreciated.

jarun commented 4 years ago

nnn is a minimal file manager by design: https://github.com/jarun/nnn/wiki#design-factors

It supports 8-bit colors. If you are looking for a way to find files by extension use filters or sort by extension.

More that 8-bit colors will not be supported in nnn. There are plenty of good file managers which already do that. Pick one of those.

mkrusemark commented 4 years ago

8-bit is sufficient. I just would like to change the color of file names and directories to ones that fit to my black background. The full feature set of dircolors is not necessary.

I think a black screen is standard but the dark blue color of file and directory names is almost impossible to read.

jarun commented 4 years ago

I just would like to change the color of file names and directories to ones that fit to my black background

file names

That has nothing to do with nnn! You'll have to set the text color in you terminal emulator for files (nnn doesn't specify any color for that).

directories

This can be set with NNN_COLORS. The color of the dir is the color of the dirs in that context.

byulen commented 4 years ago

@jarun It would be nice if an option or environment for listing files according to modification time is available. I like to list the files and directories in modification time order and each time I open nnn I have to press "t" twice to make it active. That becomes annoying after a while. Is there a way to make it automatic?

jarun commented 4 years ago

@byulen

That becomes annoying after a while.

That's applicable for all the sort orders. Shall we have program options for all of them?

byulen commented 4 years ago

Considering that somebody else might want the files sorted other way, it would be nice to have that option for all sort orders.

0xACE commented 4 years ago

Shall we have program options for all of them?

I'd wager yes, a option to change sorting order would be nice.

Btw another question, sometimes i hit tt to sort by time, but what is the intended way to restore sorting to alphabetical order? I find it difficult to know which tX combination i should hit to go back to alphabetical...

jarun commented 4 years ago

I'd wager yes, a option to change sorting order would be nice.

We are talking of multiple options for each sorting order. I don't think we can have so many options.

Btw another question, sometimes i hit tt to sort by time, but what is the intended way to restore sorting to alphabetical order?

Press tt again. The key t (the first one) says very clearly sort toggles.

jarun commented 4 years ago

@byulen we can't have so many redundant options and we can't give preference to time sort over others. Please use the sort toggle key as it's designed to be used.

byulen commented 4 years ago

@jarun Thanks for answering. There are only 8 sort options that I see from the wiki "T,A,S,E,V,R,du,au". I don't understand what do you mean by many. Furthermore, I think that having a sort option is more important for a file manager than say having colored contexts options which is kind of decoration (not that colored context is not useful though). With all my respect, minimal should not mean lack of options. I very much like the current form of nnn and will continue to use it, thanks for this nice file manager. I just wanted to contribute by stating a missing part that I think is important.

jarun commented 4 years ago

@byulen @0xACE @maximbaz

I think I have a better way to do it. What if we provide an option which will make nnn ask the sort order at the start?

jarun commented 4 years ago

Or, even better, an option that will take the value of the input we provide on t.

0xACE commented 4 years ago

? From what i can tell we are using getopt(), and it supports having commandline flags utilizing arguments.

My suggestion would be that we introduce a command line argument which sets default sort order. example: -s t would sort by time. (it doesn't have to be -s im just using it as an example).

Or did I misunderstand the question?

Press tt again. The key t (the first one) says very clearly sort toggles.

Yeah the problem for me is there are times when i forget if i used ta or td. not a big deal, i was just wondering if we had tn to sort by none or something

jarun commented 4 years ago

Or did I misunderstand the question?

Your understanding is correct.

I am planning to use -T and remove -v. I will leave -S as many people would be using nnn as a du tool already.

jarun commented 4 years ago

This is implemented at commit 85379a703bb698eb69447a1fc2a717e8f2813717.

jarun commented 4 years ago

@0xACE and @maximbaz we need to test the new batch renamer plugin before making the next release. My tests went well but I need more independent results.

maximbaz commented 4 years ago

It works for me 👍

I'm still not sure how I feel about plugins though, you want to test them before releases, but they aren't distributed as part of the release, and users will install random version of plugin and expect that it will work? You will be getting bug reports like "I downloaded batch renamer plugin on date X, it doesnt work with version Y of nnn". What if right after releasing 3.1 you make a breaking change in master and correspondingly update batch renamer plugin, so that plugin in master only works with nnn from master, but not from the last release?

I propose we update Makefile and put all plugins in /usr/share/nnn/plugins during make install, and then you can say that plugins are guaranteed to work with your specific version of nnn only if they are symlinked from /usr/share/nnn/plugins and not downloaded from Github on a random day.

maximbaz commented 4 years ago

Maybe batch renamer plugin shouldn't pollute stdout? After I exit nnn I don't really want to see these lines:

$ ./nnn
'./LICENSE' -> './LICENS'
'./Makefile' -> './Makefile2'
jarun commented 4 years ago

users will install random version of plugin and expect that it will work?

Plugins are not shipped. They are indicative. In-plugin docs are a must read. Maybe we need to document these clearly. So far we did not have any nnn-integration related or nnn version specific issue because nnn is almost decoupled from plugins. What we pass from nnn when we invoke a plugin is well-documented and it's not going to change.

Maybe batch renamer plugin shouldn't pollute stdout?

@KlzXS can we have conditional logging?

rwtallant13 commented 4 years ago

this is not really the place to ask but i didnt want to create a whole new issue for this question. what is the best way to invert a selection with nnn? When encoding my media i tack "-new" onto the file name and would like to be able to select those files with nnn and then invert that selection to be left with just the files that dont have "-new" in the filename. Could this be built into nnn or is there another easy way to achieve this?

thanks.

jarun commented 4 years ago

@rwtallant13 it's on master: t followed by r.

rwtallant13 commented 4 years ago

that just reverses the sort order right?

What I'm trying to do is something like - select all files that contain '-new' but then invert that selection so i have all files that don't contain '-new' selected, which I can then delete.

jarun commented 4 years ago

If you mean you want to edit a selection manually:

Select the files, then press E. Then edit those in your editor. To sort in vim: https://vim.fandom.com/wiki/Sort_lines

nnn doesn't list only selected files because they can be from different directories.

Otherwise you can also use the list mode in nnn where you find the files ending with -new and feed them to nnn.

rwtallant13 commented 4 years ago

I think I was going about it wrong. What about filtering for files in your dir that do not contain a certain string? so if i wanted to see all files that don't have the string '-new', how would i do this? i tried using regex ^(?!new) but this didn't work for me.

Again, thanks, I'm sure I am missing something obvious here.

jarun commented 4 years ago

You need PCRE - https://github.com/jarun/nnn/wiki/Developer-guides#compile-with-pcre-lib

KlzXS commented 4 years ago

@KlzXS can we have conditional logging?

See #497.

maximbaz commented 4 years ago

Again, thanks, I'm sure I am missing something obvious here.

nnn -g 🙂

jarun commented 4 years ago

nnn -g

I tested it. The GNU regex doesn't work with the exclusion pattern. The PCRE one works.

aryadovoy commented 4 years ago

I use with "cp mv progress", but how can I copy dir and set "Yes for all" for overwrite?

0xACE commented 4 years ago

I use with "cp mv progress", but how can I copy dir and set "Yes for all" for overwrite?

I'm busy right now so responses from me may be spotty.

I don't think we have this implemented in origin/master. You should be able to do it in a plugin though. Feel free to share it with us. (There may even be such a plugin, but I don't tinker much with the supplied plugins)

AdamKorcz commented 4 years ago

May I suggest integration with Googles OSS-fuzz project for continuous fuzz-testing? I can take care of the integration process and fuzzers and would need to commit the fuzzers and a seed corpus to nnn's repository.

jarun commented 4 years ago

integration with Googles OSS-fuzz project

@KlzXS @maximbaz @0xACE opinion?

Note: we already have clang-tidy check in place in CI.

0xACE commented 4 years ago

Sure if you think it's worth implementing it. But I remain neutral, either someone implements it or not...

jarun commented 4 years ago

I am just afraid of security paranoids. They won't contribute a single line of code and expect you to meet their demands.

I had an experience at a very early stage of this project at issue #29. None of them contributed any code. One was polite enough to respond to my request, but the other one just left with a question. I would like to avoid this type.

jarun commented 4 years ago

And they have an advantage. We have a public project. So their self-stylized opinion has enough potential to show your project in bad light even if you choose to ignore. As if it's your duty to handle issues pointed out by the universe using up your free time.

AdamKorcz commented 4 years ago

@jarun Fair enough, completely understandable. If you change your mind, feel free to ping me.

0xACE commented 4 years ago

Yeah I get it, currently I can't even find the time/energy to fix the problem I promised 1 month ago, so piling extras onto a project I deal with on my free time is not very appealing to me at this time.

nwaywood commented 4 years ago

I found this plugin from watching Luke Smith's video.

In that video he did things like:

Have those features been removed? They seem quite useful, especially being able to list the current selection...

jarun commented 4 years ago

@nwaywood that video is years old. On later you have open in editor, but no open in pager. List edit selection is E. Please look up the help with ?.

nwaywood commented 4 years ago

Yes I am aware of open in editor, I personally would still prefer a $PAGER option as well since a pager is quicker to open than an editor and thus better for a quick preview of a file.

Same logic applies to list selection, viewing the selection list in a $PAGER is quicker than viewing it in $EDITOR.

Perhaps $PAGER support could be a compile out feature for those that don't want it?

jarun commented 4 years ago

@nwaywood see https://github.com/jarun/nnn/tree/master/plugins#some-useful-key-command-examples

specially the p key. This is what you need to use. We can't add compile out features of every small thing.

nwaywood commented 4 years ago

Ah yes that's exactly what I'm after! Thanks. Not ideal it needing to be two key presses instead of one but I understand why you wanted to remove the functionality from the core package.

jarun commented 4 years ago

@nwaywood previews are available in master.