Skip to content
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 #386

Closed
52 of 62 tasks
jarun opened this issue Nov 17, 2019 · 128 comments
Closed
52 of 62 tasks

ToDo list #386

jarun opened this issue Nov 17, 2019 · 128 comments

Comments

@jarun
Copy link
Owner

jarun commented Nov 17, 2019

Rolled from #337.

For next release

  • all keybinds and options reviewed by the team, finalized and frozen
  • auto archive handling by extension (see config NNN_ARCHIVE)
  • reverse sort (keys R and ^T)
  • sort only filtered entries (instead of refresh)
  • Lead key simplified to Bookmark key (b or ^/)
  • improved help screen readability
  • plugin nuke: sample opener (CLI-only by default)
  • internal plugin .cbcp: copy selection to system clipboard
  • internal plugin .ntfy: show notis on cp, mv, rm completion
  • plugin autojump: navigate using autojump
  • plugin upload (previously transfer), uses https://file.io
  • prefix - to skip dir refresh after running (cmd as) plugin
  • suffix * to skip confirmation after running cmd as plugin
  • all fuzzy plugins modified to support both fzf and fzy
  • add prefix instead of suffix for link creation
  • indicate range selection mode with *
  • list keys at bookmark and plugin key prompts
  • jump to pinned directory like bookmark (Bookmark key followed by ,)
  • toggle executable (key *)
  • show mime along with file details
  • retain filter when Up and Down are pressed (across contexts)
  • remove option -f to run filter as prompt on prompt key (can be disruptive)
  • remove redundant plugin key : (alternatives more convenient)
  • remove redundant first file key Lead' (alternative more convenient)
  • option -x: enable notis and copy selection to system clipboard
  • option -g: regex filters (substring filter is default now)
  • option -Q: quit program without confirmation
  • option -s: load session (earlier -e)
  • option -n: start in nav-as-you-type mode (earlier -i)
  • option -v: version sort (earlier -n)
  • option -V: show program version (earlier -v)
  • option -A: disable dir auto-select (earlier -t)
  • key v: runtime version sort
  • key s: manage session
  • key y: list selection, key ^Y: edit selection
  • key ,: pin CWD
  • key i: archive entry
  • key ^V: copy/move selection as
  • key ^P: pick and run a plugin
  • ISO 8601 compliant date in status bar
  • ported to Haiku OS (thanks @annagrram)
  • fix getplugs to install hidden files
  • fix several selection issues (see Selection issues with version 2.8.1 #400)
  • fix detail mode not restored on loading session
  • fix symlink to directory not auto-selected
  • fix regex error on partial regex patterns
  • fix symlink not shown if stat() on target fails
  • fix flags when spawning a CLI opener as default FM
  • fix issue with stat flag on Sun (no support for dirent.d_type)
  • fix current file in current context not saved correctly in session
  • signed source distribution on release
  • simplified debugging with line numbers in logs

Proposed features and tasks (up for grabs)

  • remember the last filter within the filter buffer and show it at a particular keypress if the filter is empty (have a keybind at empty filter)
  • switch between substring-search and regex (have keybind at empty filter to switch)
  • detect and enable case-sensitive matches when there's a capital in the string
  • redraw only affected lines on Up/Down key navigation
  • take list of files as input and show
  • add PCRE code within a macro and add Makefile target to compile with PCRE library
  • support pre-defined filters like bookmarks
  • Cygwin package
  • update the nnn.vim plugin to show a persistent bar (Support vim popup mcchrish/nnn.vim#46)
  • a video exploring nnn plugins

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

List of completed features and tasks.

@jarun jarun mentioned this issue Nov 17, 2019
3 tasks
Repository owner deleted a comment from n-ham Nov 19, 2019
@0xACE
Copy link
Collaborator

0xACE commented Dec 4, 2019

Hey, I think i encountered the lastdir problem described in: 20ac9da#commitcomment-36198570

appear in commit: f80563e

as I was on the run, I didn't have time to note which commit i was on when it happened, and since then I have rebased on master... I tried reproducing it though and I can't anymore, so I'm not sure if that build was spooked somehow...

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

I think it's fixed in master. Please try a few more times with the release.

@0xACE
Copy link
Collaborator

0xACE commented Dec 4, 2019

I tried again, it happened again. I'm not exactly sure how to reproduce it.

I can't reproduce it in a "testing" scenario, the problem appears when I'm using nnn naturally...

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

I am not sure how this helps. We had days to test this before the release and I did call out to all of you to pitch in. Your natural usage is not helping me to reproduce this.

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

@0xACE any luck yet? Please confirm you are on master.

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

@maximbaz can you please help us repro the issue @0xACE is seeing?

@maximbaz
Copy link
Contributor

maximbaz commented Dec 4, 2019

Will try, but after you pushed ef88a31 and 0a5dc2e I've had zero issues with selection. If I spot it, I'll let you know right away.

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

Yes, even I am not seeing this.

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

@0xACE I also took a look at master source to track if we are clearing lastdir anywhere but I couldn't find any such instance.

@0xACE
Copy link
Collaborator

0xACE commented Dec 4, 2019

I am not sure how this helps. We had days to test this before the release and I did call out to all of you to pitch in.

I did try it out in my limited time, and I don't recall that I encountered it

Your natural usage is not helping me to reproduce this.

Yeah, atm I don't have a way to describe it because I don't understand it myself.

@0xACE any luck yet? Please confirm you are on master.

Yes I am on master.

Will try, but after you pushed ef88a31 and 0a5dc2e I've had zero issues with selection. If I spot it, I'll let you know right away.

No need to push yourselves, I haven't confirmed it myself, I was mostly wondering if someone else is encountering this issue.

@0xACE I also took a look at master source to track if we are clearing lastdir anywhere but I couldn't find any such instance.

Yeah, I haven't looked at the code yet. As I don't know how to reproduce it, I'm just gauging if someone else has this problem.

I'll let you know next time I encounter the problem. For now there is not much I can do about it...

One thing both occurances had in common was that I selected a folder for a that was being downloaded via torrent. I left nnn running while that torrent was downloading, and when it finished, I went back to nnn to try to move the selected folder, and thats when I noticed the selected path was incorrect... But I'm not sure how that affects nnn...

@jarun
Copy link
Owner Author

jarun commented Dec 4, 2019

One thing both occurances had in common was that I selected a folder for a that was being downloaded via torrent.

I'll try this.

@jarun
Copy link
Owner Author

jarun commented Dec 5, 2019

And no luck! I've made the minor release already. If it's really an issue we will surely get user reports and we can fix it when we have some more concrete data.

@0xACE
Copy link
Collaborator

0xACE commented Dec 5, 2019

Happened again, this time there were no torrents involved.

I'm disabling all my personal patches just incase this problem is caused by my changes. I'll let you know next time...

Btw is it important to K flush the selection? because I have never used it, and I don't think I intend to use it...

@jarun
Copy link
Owner Author

jarun commented Dec 6, 2019

Btw is it important to K flush the selection?

Not for flush, not really. Because of your use case, I made the flush to .selection file auto. But yes, it's required to edit.

@jarun
Copy link
Owner Author

jarun commented Dec 17, 2019

@maximbaz can you check if there's any way to reduce the binary size further? For me it is 62.1 K now. I would love to bring it below 60 K.

@maximbaz
Copy link
Contributor

I'll have a look, out of curiosity, can you share the full command that you use to compile?

If I run make locally, it executes the command below, resulting in 93kb file.

cc  -Wall -Wextra -O3 -D_GNU_SOURCE -D_DEFAULT_SOURCE   -o nnn src/nnn.c -lreadline -lncursesw

If I run make on the build environment for Arch Linux (this is what we distribute to users), make executes the command below, resulting in 87kb file.

$ cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -O3 -D_GNU_SOURCE -D_DEFAULT_SOURCE  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o nnn src/nnn.c -lreadline -lncursesw

@jarun
Copy link
Owner Author

jarun commented Dec 17, 2019

here's what I see on Ubuntu 18.04, amd64:

~/GitHub/nnn$ sudo make O_NORL=1 strip install
cc -DNORL -Wall -Wextra -O3 -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw  -o nnn src/nnn.c -lncursesw -ltinfo
strip nnn
install -m 0755 -d /usr/local/bin
install -m 0755 nnn /usr/local/bin
install -m 0755 -d /usr/local/share/man/man1
install -m 0644 nnn.1 /usr/local/share/man/man1
~/GitHub/nnn$ ll nnn
-rwxr-xr-x 1 root root 63616 Dec 17 18:11 nnn*
~/GitHub/nnn$

@jarun
Copy link
Owner Author

jarun commented Dec 18, 2019

@annagrram shall we remove the "@" session after we restore it? I think currently it's not happening. I don't remember if we talked about this during implementation.

@annagrram
Copy link
Collaborator

@annagrram shall we remove the "@" session after we restore it? I think currently it's not happening. I don't remember if we talked about this during implementation.

We haven't talked about it, but yeah. Sure

@jarun
Copy link
Owner Author

jarun commented Dec 19, 2019

I have checked-in the change already at commit cf38864. Please review once.

@0xACE
Copy link
Collaborator

0xACE commented Dec 19, 2019

Just a quickie: I tried opening a file which had a ' in it: example This Boy's Life with ^o (CTRL-o) and it failed to open it. anyone else having problems with this?

@jarun
Copy link
Owner Author

jarun commented Dec 19, 2019

which application did you try to open it with?

@0xACE
Copy link
Collaborator

0xACE commented Dec 19, 2019

which application did you try to open it with?

a personal tool i made. But nvm, I can't reproduce the error anymore. I thought maybe i misspelled my tool, but looking at the history, i did write it in correctly.

Anyhow, since I can't reproduce it, it's most likely a user error on my end and not nnn related.

@KlzXS
Copy link
Collaborator

KlzXS commented Dec 19, 2019

On the other hand is anybody experiencing "swallowing of input", i.e. after ^o if you try to open a cli program as gui (it seems to not work for every program but for vim it does), every second keypress doesn't do anything. This also persists even after exiting nnn until the terminal is closed. Also affects ttys.

@jarun
Copy link
Owner Author

jarun commented Dec 19, 2019

if you try to open a cli program as gui

please don't do this. It will mess up your terminal. Open a CLI program as cli and GUI program as gui. I don't think we will be able to support the inter-mixing with any kind of hacks. We can't detect ourselves whether a executable is GUI or CLI.

@0xACE

Is the tool a cli-only opener? or does it invoke a gui program?

@KlzXS
Copy link
Collaborator

KlzXS commented Dec 19, 2019

please don't do this

This time I did it on accident but I think this also happens sometimes with some files when it doesn't know with what to open it. At least it did in the past. Just by using l, Enter.

@jarun
Copy link
Owner Author

jarun commented Dec 19, 2019

What's your opener?

If it's a text file do you have NNN_USE_EDITOR set?

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

@awsdert a visual/textual example please.

@awsdert
Copy link

awsdert commented Jan 10, 2020

I see peops mentioning about filters, just use regular expressions, example way to create it would be nnn --reg /bin/*

@awsdert
Copy link

awsdert commented Jan 10, 2020

@joron, you'll have to wait for me to get back from work, only just started so can't focus on phone or think through an example

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

I think you are talking about visual changes in the listing. No plans to change the current listing style as it will affect areas like navigation, drawing etc.

@jarun jarun pinned this issue Jan 10, 2020
@jarun jarun unpinned this issue Jan 10, 2020
@awsdert
Copy link

awsdert commented Jan 10, 2020

I actually thought this was a command lone utility like gcc, anyways I imagine your drawing function begins & ends with something like glBegin & glEnd, just put those in wrapper functions called FrameOne and FrameEnd and add a new one called FrameNxt and return the correct frame from them, when in grouping mode it just ends the previous and starts a new drawing ctx or whatever and then the main function remains none the wiser

@KlzXS
Copy link
Collaborator

KlzXS commented Jan 10, 2020

Well that's not how it's implemented. You can take a look at the code.

@KlzXS
Copy link
Collaborator

KlzXS commented Jan 10, 2020

Also this has nothing to do with opengl. This a terminal file manager, we use ncurses (or rather ncursesw if we're being 100% correct).

@awsdert
Copy link

awsdert commented Jan 10, 2020

I said something LIKE, meaning however your drawing function begins and ends a simple check in the middle is enough to call FrameNxt, also since it really is a command line utility as I thought, why not just use printf?, you only have to add a couple lines midway every now and then, anyways I'll take a look myself when I get the chance, however could someone point me in the right direction?

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

@KlzXS resuming the discussion on opening a list of files...

how about creating a temporary directory with softlinks to the list of files? All our issues would be gone. The user knows what he is doing and the file details will show the actual target.

Update: before you quit, simply remove the tmp directory.

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

@awsdert the drawing is done in redraw(). For navigation search "SEL_NEXT".

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

@awsdert

why not just use printf

because ncursesw is lean and provides features like mouse handling, resizing, coloring etc. without having to worry about tty details. We are not interested in rebuilding the wheel here.

@KlzXS
Copy link
Collaborator

KlzXS commented Jan 10, 2020

Well that would mean you couldn't remove or rename files unless we implement special logic for it. Also it seems a bit wasteful to create all these links. Do you actually know if creating a bunch of links at once is a performance issue?

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

Well that would mean you couldn't remove or rename files

You will know when you are in this mode. So we will always use the target file (readlink()) for these operations.

Also it seems a bit wasteful to create all these links.

We will remove these when we quit. No it's not a performance problem. We already support softlink creation to selected files in bunch in nnn. Also I mentioned a tmp dir. Many people (like me) use tmpfs for that.

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

And trust me, this is much better than storing every path and manipulating it wherever we access path in browse() today.

@ghistes
Copy link

ghistes commented Jan 10, 2020

A little feedback on filtering (in particular with regexes):

Most of the time the "standard" case-insensitive substring search is exactly what I want.

But sometimes I would like to search case-sensitive - this applies to both substring-search and regexes. At the moment everything is case-insensitve all the time with no way to change that.

Sometimes I want to filter based on a regex and then I have to restart nnn as I have to decide before I start nnn wether or not to use regexes. I would prefer a way where I could switch between substring-search and regex-matching without having to restart.

Sometimes it takes me a few tries to get the regex right. It would be extremely helpful if nnn would remember a few searches/patterns (or at least one) and would allow you to recall them (like eg vim does) so you could filter iteratively without having to type everything again.

I assume you want to stay as POSIXy as possible, but Perl compatible regexes are both more powerful and more convenient (and I am used to them). Just compare "\d" vs "[[:digit:]]".
There are PCRE-libraries for C, so in the longer run maybe it would be possible to be able to compile nnn with either the POSIX-library or the a PCRE-library?

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

At the moment everything is case-insensitive all the time with no way to change that.

It stays as it is. Most users wouldn't bother remembering the case in a filename.

I would prefer a way where I could switch between substring-search and regex-matching without having to restart.

That would mean another keybind... not happening. Close and open.

if nnn would remember a few searches/patterns (or at least one) and would allow you to recall them (like eg vim does) so you could filter iteratively without having to type everything again.

vim is not a great piece of software when it comes to memory management. I use lnav to check GBs of logs because vim is not fit for the job.
However, I think we can remember the last filter within the filter itself and show it at a particular keypress if the filter is empty.

so in the longer run maybe it would be possible to be able to compile nnn with either the POSIX-library or the a PCRE-library?

We just link to a standard C library (maybe glibc in your case) and it provides what you see. Can't add a new lib dep for this.

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

We just link to a standard C library (maybe glibc in your case) and it provides what you see. Can't add a new lib dep for this.

If you really want this, add the code within a macro and add a new Makefile target to compile with the PCRE library.

@maximbaz
Copy link
Contributor

Hey guys, just quickly dropping by to report a small issue with reverse sort (R), it doesn't work on filtered directories.

  • Enter directory
  • Press /a<Esc>
  • Now try to reverse with R

Actual: List is not reversed, but status bar shows R as if it is.
Expected: Either list is reversed (preferred), or R doesn't appear in status bar

P.S. Wow this is a long thread! 😄

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

I would prefer a way where I could switch between substring-search and regex-matching without having to restart.

I guess we can have key which when pressed in empty prompt switches between regex and string. What should the keybind be?

I think we can remember the last filter within the filter itself and show it at a particular keypress if the filter is empty.

And what should this keypress be?

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

@maximbaz commit c22bf87 should fix it.

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

@ghistes I think I have probable ways for all your requests:

At the moment everything is case-insensitive all the time with no way to change that

Maybe we can detect and enable case-sensitive matches when there's a capital in the string.

I would prefer a way where I could switch between substring-search and regex-matching without having to restart.

Suggest a keybind at empty prompt to do that.

if nnn would remember a few searches/patterns (or at least one)

I think we can remember the last filter within the filter itself and show it at a particular keypress if the filter is empty. Suggest a keypress.

We just link to a standard C library (maybe glibc in your case) and it provides what you see. Can't add a new lib dep for this.

If you really want this, add the code within a macro and add a new Makefile target to compile with the PCRE library. @maximbaz would you like to try this?

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

I have added line items for all of these.

@KlzXS
Copy link
Collaborator

KlzXS commented Jan 10, 2020

For the filter keybinds. Use up arrow for previous, it's intuitive. Maybe use the left and right arrows to switch between regex and substring and maybe put something like s/r as a prompt and highlight the currently enabled one. Just and idea.

@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

Currently the arrows work as they should in non-filter mode. Can't change the behaviour. Need control-codes.

@jarun jarun mentioned this issue Jan 10, 2020
14 tasks
@jarun
Copy link
Owner Author

jarun commented Jan 10, 2020

Rolled at #427.

@jarun jarun closed this as completed Jan 10, 2020
Repository owner locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants