jarun / nnn

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

ToDo list #337

Closed jarun closed 4 years ago

jarun commented 5 years ago

Rolled from #332.

Ready for next release

Proposed features and tasks (up for grabs)

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

List of completed features and tasks.

KlzXS commented 5 years ago

I've been meaning to ask, what exactly does "script to duplicate selection in respective directories" mean? Does it mean if I selected some entries in dirx that it should select all available entries with the same name in diry? Should this be a plugin?

jarun commented 5 years ago

@KlzXS the script would ask for a suffix from the user and create duplicates of paths in selection. I don't see a pressing need for it right now.

KlzXS commented 5 years ago

Right. I just wanted to clear up the wording a bit, I found it to be a bit ambiguous.

0xACE commented 5 years ago

https://en.wikipedia.org/wiki/Nnn_(file_manager)

jarun commented 5 years ago

@0xACE wow! I can't appreciate you enough for this!

jarun commented 5 years ago

@0xACE @KlzXS I am planning to make a release in a few hours. Any last minute additions?

0xACE commented 5 years ago

@0xACE wow! I can't appreciate you enough for this!

Anytime bro.

@0xACE @KlzXS I am planning to make a release in a few hours. Any last minute additions?

Nah, go ahead from me. I'm working on a patch for the mouse support but it will not be done in time I'm afraid...

KlzXS commented 5 years ago

Go ahead. There's nothing I have right now.

jarun commented 5 years ago

@0xACE No problem! This release is a massive one. I don't think we have added so many features in a single release in any of my projects ever! Thank you both for your active contribution.

jarun commented 5 years ago

@0xACE the first release (v1.0) of nnn was on 13 Apr, 2017. Can you please update?

jarun commented 5 years ago

I have updated the initial release date on Wiki.

jarun commented 5 years ago

Hey guys! We have archive mounting in place now. Optional dep but it's quite useful.

I also made some improvements to unmount:

lawnowner commented 5 years ago

Is there a way to get traversed path in a plugin? That is, working directory displayed next to context numbers on top. Both pwd -L and pwd -P give physcial path of working directory avoiding any symlinks, as does $PWD.

jarun commented 5 years ago

@lawnowner do you mean to say you are only seeing absolute paths? That's the intended behaviour.

lawnowner commented 5 years ago

I mean I'm seeing absolute paths with symlinks resolved in plugins (canonical paths), e.g. when the nnn top bar display working directory as "/home/lo/Pictures/Mechanisms", $PWD or pwd -L command gives "/mnt/data1/Pictures/Mechanisms" in a plugin.

jarun commented 5 years ago

Hmmm... I'll fix this if you promise to award a star to the project. It's been some time I'm running your errands. ;) :laughing:

lawnowner commented 5 years ago

Will definitely do, as deserved, and much appreciated!

jarun commented 5 years ago

Test with commit 087380968d4cd828881995b1196181a3c8c23a9f. Unresolved path will be passed as $2 to the plugin.

jarun commented 5 years ago

@KlzXS @0xACE @annagrram with the change from @KlzXS yesterday, the binary size of nnn has exceeded 60KB. We may have to find some ways to reduce it again. The const strings add to the size but what we have currently (help, patterns and keybinds help) are inevitable.

KlzXS commented 5 years ago

The biggest offender here is browse(). It's the biggest finction, both source code wise and binary wise, and is also the most complex one. We should see if there is any way to simplify it. The nested switches seem like a great thing to eliminate.

jarun commented 5 years ago

The nested switches seem like a great thing to eliminate.

I remember that after grouping cases the size decreased. But yes, if we can refomat that would be great. But I don't see an easy way to do that.

annagrram commented 5 years ago

@KlzXS @0xACE @annagrram with the change from @KlzXS yesterday, the binary size of nnn has exceeded 60KB. We may have to find some ways to reduce it again. The const strings add to the size but what we have currently (help, patterns and keybinds help) are inevitable.

Aggressive optimizations for fast execution might cause the executable to grow. I don't find it too worrisome at the moment (76K stripped on my machine with gcc). But, if we want an easy and quick solution, we can try use a packer like UPX. On my machine, it creates a 40K executable, should affect only load time which is unnoticeable, on my machine at least, because the binary is quite small to begin with, so it doesn't have a lot unpacking to do (according to their page, it should be able to unpack the entire binary in a fraction of a second even on ancient systems).

That is, of course, not to say that some code cleanup and refactor (especially of the browse function), might be beneficial.

jarun commented 5 years ago

we can try use a packer like UPX

not yet

That is, of course, not to say that some code cleanup and refactor (especially of the browse function), might be beneficial.

We will try this first. Let's have the important features (cp/mv as, session support) in and stable. If we get rid of the help, we can get back to original size (I tried it). So probably we'll target the strings first - to make them meaningfully shorter. But let's have the features in.

jarun commented 5 years ago

@0xACE AFAIK, you are on Arch Linux. Do you have fusermount3 or fusermount?

jarun commented 5 years ago

@0xACE @KlzXS @annagrram are you getting my messages in the dev discussion group?

annagrram commented 5 years ago

Yes

jarun commented 5 years ago

OK, I don't see any response so thought there's a problem.

0xACE commented 5 years ago

@0xACE AFAIK, you are on Arch Linux. Do you have fusermount3 or fusermount?

there is fuse3 and fuse2.

I have both installed. as dependencies of other packages. In my case sshfs depends on fuse3 and archviemount depends on fuse2

@0xACE @KlzXS @annagrram are you getting my messages in the dev discussion group?

Yessir. My problem is mostly that launching the browser and going to github is a big task for my main machine... My phone is better than my pc... And my phone is shit... The terminal life is friendly though :-D

KlzXS commented 5 years ago

I am also recieving messages when I turn on data, but I'm in roaming so I'm trying to cut that to a minimum. I will return home on the 24th so until then I probably won't be responding much.

annagrram commented 5 years ago

The terminal life is friendly though :-D

Go for a terminal browser then :)

jarun commented 5 years ago

I have both installed. as dependencies of other packages. In my case sshfs depends on fuse3 and archviemount depends on fuse2

In that case, is archivemount with nnn broken for you? Because if it finds fusermount3 it will use it.

0xACE commented 5 years ago

In that case, is archivemount with nnn broken for you? Because if it finds fusermount3 it will use it.

broken in which way? i have previously tried archivemount and didn't have issues.

my pc has both fustermount3 and fusermount (represnting fuse2)... From my experience I haven't seen error messages so far...

I can see that unmount() is defaulting to fusermount3. so I ran fusermount3 -u myarchive and it unmounts without errors...

Go for a terminal browser then :)

Some times I do, but really the entire web is a poor experience for me... Mail would be easier considering github works sort of with it, but I'm not inclined to fill my inbox with that just yet...

jarun commented 5 years ago

@0xACE, I must tell you, with your mouse click patch, nnn on Termux is smoother than ever. I use it heavily.

jarun commented 5 years ago

I am working on refactoring browse() to make it thinner wherever possible.

jarun commented 5 years ago

@0xACE would it be possible to combine the drag and drop plugins into one?

0xACE commented 5 years ago

@0xACE would it be possible to combine the drag and drop plugins into one?

Absolutely, I'm busy this week, so I won't be able to provide much help, but feel free to do with it as you like...

jarun commented 5 years ago

Absolutely, I'm busy this week, so I won't be able to provide much help, but feel free to do with it as you like...

No hurry. Whenever you get the time. I don't use mouse or have dragon installed. ;)

0xACE commented 5 years ago

Well it just happened, I accidentally deleted a file I didn't intend to delete...

Can we implement a method to show what we are about to force delete in both ^X and X?

Any ideas on how that implementation would look/work?

jarun commented 5 years ago

show the selection or current. but we already ask, this is gonna add to delay.

If you need it, make it optional.

jarun commented 5 years ago

For ^X, it's your hovered file. Why do we need to show again? We don't block the view either.

0xACE commented 5 years ago

I'm frequently confused by which one is which X vs ^x, and it doesn't help that my tmux has ^x as leader key...

It frequently confuses me. but no worries, ignore that I brought it up, I'll experiment locally to see if there is something I could do about it :)

jarun commented 5 years ago

I'm frequently confused by which one is which X vs ^x

Awwww... you aren't using it enough! ;)

aryadovoy commented 5 years ago

Hey, I cannot see size of dirs. What should I do?

jarun commented 5 years ago

@aryadovoy on which version are you? what do you mean by size of dirs? size in du mode or the regular size?

aryadovoy commented 5 years ago

@aryadovoy on which version are you? what do you mean by size of dirs? size in du mode or the regular size?

Master of 2.7. I prefer du mode, but any option would be enough.

jarun commented 5 years ago

The cumulative size si shown in du or au mode already. In normal mode the size from stat is shown. Can you share a screenshot of what you are seeing?

aryadovoy commented 5 years ago

I used D-key for checking sizes by bytes, but nothing. 2019-11-01_094015 2019-11-01_094038

jarun commented 5 years ago

D is for the file details. You can already see the du for the dir in the du screen.

If you are looking just for the byte size, what's the use-case?

jarun commented 5 years ago

It's not that difficult though... in the du or au mode we can show the byte-size in the status bar anyway.

aryadovoy commented 5 years ago

If you are looking just for the byte size, what's the use-case? Exact size of directory for comparing.