8000 ToDo list · Issue #1133 · jarun/nnn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ToDo list #1133

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

Closed
3 of 4 tasks
jarun opened this issue Aug 17, 2021 · 56 comments
Closed
3 of 4 tasks

ToDo list #1133

jarun opened this issue Aug 17, 2021 · 56 comments
Labels

Comments

@jarun
Copy link
Owner
jarun commented Aug 17, 2021

Rolled from #1122.

Cooking

Up for grabs

For anything else please discuss in this thread.

Contribution guideline.

@jarun jarun added bug planning and removed bug labels Aug 17, 2021
@N-R-K
Copy link
Collaborator
N-R-K commented Sep 9, 2021

Small nitpick, but I think having the ascii logo above the version/license would be better. Reasoning is that the help screen should prioritize showing useful information like keybinding more.

@jarun
Copy link
Owner Author
jarun commented Sep 9, 2021

Nah. I want to show it off.

@CantoroMC
Copy link
Contributor
CantoroMC commented Sep 11, 2021

Hello,
these are some of my entries for NNN_PLUG

  • e:-!&emacs $nnn
  • f:-!&pickOne (this is a zsh script that open a random file with xdg-open)
  • d:-!git diff

The first two doesn't work anymore (but they used to); probably something has changed but i'm unable to find the documentation.

@jarun
Copy link
Owner Author
jarun commented Sep 11, 2021

Please try master. If they do not work, please find the commit that may have broke them. I'm sorry but I don't have the time to find that out for you.

@CantoroMC
Copy link
Contributor

I'm on master, it may have happen in the last two days, i will take a look which is the guilty commit and report back.

I've asked to know if plugin syntax have changed without being documented.

@CantoroMC
Copy link
Contributor
  • fa7cef2 this commits breaks the "plugin" assigned to letter e
  • 27e1eb5 this commit breaks also the "plugin" assigned to letter f

@jarun
Copy link
Owner Author
jarun commented Sep 16, 2021

@CantoroMC

We recently fixed #1162. Can you check that works for you?

@CantoroMC
Copy link
Contributor

@jarun
Yes they work as expected now.

@jarun
Copy link
Owner Author
jarun commented Sep 16, 2021

Thanks for confirming!

< 8000 /form>
@CantoroMC
Copy link
Contributor

As always, thanks to you!

@CantoroMC
Copy link
Contributor

Unfortunately, i was wrong.
I've forget to install the new binary and launch the previous one.

@jarun
Copy link
Owner Author
jarun commented Sep 17, 2021

Make sure you single quote the exports for NNN_PLUG.

@CantoroMC
Copy link
Contributor

They are already single quotes.

export NNN_PLUG='a:mp3conv;b:oldbigfile;c:fzcd;d:-!git diff;e:-!&emacs $nnn;f:-!&pickOne;g:-!git status;i:imgview;o:fzopen;p:-preview-tui;r:rsynccp;t:-preview-tabbed;x:xdgdefault'

@jarun
Copy link
8000
Owner Author
jarun commented Sep 18, 2021

Please try to debug this as I will be very busy for a while.

@jarun
Copy link
Owner Author
jarun commented Sep 24, 2021

@CantoroMC any update on this?

@CantoroMC
Copy link
Contributor

Unfortunately, I don't have enough experience/time in order to deal easily with this issue.
As a temporary solution, I have replaced the misbehaving key with actual plugins.
If is required I can help with any feedback/test.

@jarun
Copy link
Owner Author
jarun commented Sep 25, 2021

@CantoroMC please confirm if commit 046d676 fixes the issues.

@CantoroMC
Copy link
Contributor

It seems so.
Thanks

@N-R-K
Copy link
Collaborator
N-R-K commented Sep 26, 2021

Don't you think the wiki footer should be upgraded from a dolphin to a horse? ♞♘

@jarun
Copy link
Owner Author
jarun commented Sep 26, 2021

Done! Thanks!

@pfdint
Copy link
pfdint commented Sep 28, 2021

Can we please have rebindable keys? I'm aware it's a somewhat systemic change but we'll have to do it eventually, it's just part of maturing as a program.

@CantoroMC
Copy link
Contributor

@pfdint I'm not responsible for the development of nnn and I may be wrong.
I think that what your asking for(configuring keybinding in a config file) is against the nnn philosophy of "No config file, minimal config with sensible defaults"
Anyway, if you don't like the default keybindings(which are very intuitive in my opinion) you can modify https://github.com/jarun/nnn/blob/master/src/nnn.h and compile.

@pfdint
Copy link
pfdint commented Sep 29, 2021

Keybind overrides can be read from environment variables.
(I do find the bindings deficient: three-quarters vim, one-quarter emacs, bunch of rare wacky stuff bound, buttons nearest the fingers being unbound, explanations of the buttons often mystifying; but that's not the point. To fit in to more workflows and for our friends with different keyboards, programs mature into having customizable keys without recompiling.)

@jarun
Copy link
Owner Author
jarun commented Sep 29, 2021

@pfdint we are not working on a script here. Keybinds can be changed easily if you are OK to compile the program. If not, choose a file manager which suits your needs. There's nothing wrong in that.

@pfdint
Copy link
pfdint commented Sep 29, 2021

Sounds fair.

@N-R-K
Copy link
Collaborator
N-R-K commented Sep 29, 2021

bunch of rare wacky stuff bound
explanations of the buttons often mystifying

Just out of curiosity, can you name a couple of these rare wacky ones? @pfdint

@pfdint
Copy link
pfdint commented Sep 29, 2021

Definitely the weirdest ones I saw were
] opens a weird interpretive-step-style bash shell
> exports the entire current directory content listing to your editor
0 locks entire terminal with the user password

@jarun
Copy link
Owner Author
jarun commented Sep 30, 2021

well within comfort range of a vim user

We never claim that we are vim-like in every aspect. Also, now I remember there was another reason behind the decision to allow users to re-configure only through compilation (note the option -K to simplify the process as well). At some point we were spending a significant amount of time on fixing keybind clashes configured by the user.

@N-R-K
Copy link
Collaborator
N-R-K commented Sep 30, 2021

Think it's acceptable to disable e on picker mode? When using nnn.vim I've pressed that too many times due to muscle memory resulting in vim being nested inside the vim terminal.

One other problem I've had with the picker mode was l opening file instead of picking them. Using -o serves as a workaround but in the help screen l and Ret are listed side by side, so imo the expected behavior is that l and Ret should do the same thing even in picker mode.

@jarun
Copy link
Owner Author
jarun commented Sep 30, 2021

Think it's acceptable to disable e on picker mode?

We can do that.

One other problem I've had with the picker mode was l opening file instead of picking them.

I think that behaviour is documented in nnn.vim. It was discussed before we left it that way.

@0xACE
Copy link
Collaborator
0xACE commented Sep 30, 2021

@pfdint Unfortunately we cannot implement that feature for in the state the program is today. E.g. If keybindings were to be implemented it'd make sense to make a config parser first. Instead we lazily rely on environmental variables... I think we are a long way from doing this. Make peace with it and learn to live with it. I agree that some mindings are weird, but I patch them locally and pull my branch to all my machines, I've been disconnected from master since day one....

If you insist i wrote you a stupid concept 2 nights ago, beware, not much effort was put into this:

enum action {
	SEL_BACK = 1,
	SEL_OPEN,
	SEL_NAV_IN,
	SEL_NEXT,
};
struct key {
	int sym;
	enum action act;
};



struct key bindings[200] = {
    {'h', SEL_BACK}
};

char *cstr = "65,1;92,3;";

const size_t maxparse = 64;
char keybuffer[maxparse];

int key,act;

char *ptr = cstr;
size_t count = 0;
while(*ptr && sscanf(ptr, "%d,%d;", &key, &act) == 2){
    printf("read: %d,%d\n",key,act);
    bindings[count++] = (struct key){key,act};
    while(*(++ptr)) {
        if (*ptr == ';'){
            ptr++;
            break;
        }
    }
}
read: 65,1
read: 92,3

It's prone to exploits and would require a bash script that translate the original keystrokes into parseable numbers. It's also require some patching in other parts of the code as bindings should actually be a dynamically allocated array, meaning it will lose its sizing information. it could easily be changed to parse char too but then you'd have to make sure you apply modifiers correctly and what not...

@N-R-K
Copy link
Collaborator
N-R-K commented Sep 30, 2021

@0xACE If they're going to compile from source then at that point might as well just change the binding in the source itself, much less effort that way. nnn has very few deps, compiles fast and you can get some extra goodies such as NERD icons, git status etc, I don't see much reason to avoid wanting to compile such a small package.

But anyhow, if not wanting to compile is huge priority then it's probably best to use another FM that allows configurable key-binding. There's a huge list of cli FMs to pick from.

@0xACE
Copy link
Collaborator
0xACE commented Sep 30, 2021

@0xACE If they're going to compile from source then at that point might as well just change the binding in the source itself, much less effort that way. nnn has very few deps, compiles fast and you can get some extra goodies such as NERD icons, git status etc, I don't see much reason to avoid wanting to compile such a small package.

Yeah, though there are differences of behavior on my different machines. on my phone i use a ipod-esque scrolling behaviour and context aware clicking behavior, i dont remember how i made my android aware of patching this: my nnn branch has been stale for a while now. But other than that all my machines use the same static setup

To make it clear. I wouldn't advocate anyone actually implements a keybind parser, but if he so wishes: a concept has now been provided. I'm guessing he comes from the usergroup that relies on the distros package manager. Honestly i rarely ever change upstream keybindings, it makes me agnostic to working on machines that i dont own.

Unrelated to the keybindings: I'll try to go through some of my minor changes that are compatible with upstream and supply patches

@0xACE
Copy link
Collaborator
0xACE commented Sep 30, 2021

I'm guessing he comes from the usergroup that relies on the distros package manager.

I should emphasize that it translates into: A large group of our (potential) userbase are affected by compile time decisions. Which may hurt our adoption rate.

@jarun
Copy link
Owner Author
jarun commented Sep 30, 2021

Which may hurt our adoption rate.

@0xACE I am OK with that. After years of contributing to open source, I have come to realize that the RoI for spending 100s of hours on things that I don't need myself is negligible. A large group of users come back with trivial issues and the disclaimer that they either can't code or can't compile a program. However harsh it may sound, they should not use the terminal. And it's proven by the fact that Windows is used by > 90% users. We have to accept reality. nnn is a niche utility for users who are adventurous. We can't keep spending time fixing/changing trivial things for everyone. My family needs my time more at this point.

Latest example, do you think the guy who wanted NNN_TMPFILE to be configurable would be ready to take care of the Homebrew test? NO. I had to spend hours trying dummy ruby code, thinking of workarounds and then deal with unreasonable demands from a downstream packager. End result - personally I am not going to update the nnn package on Homebrew anymore. And I am totally fine with that because I don't even use that OS.

There's a saying from Buddha that goes like - things that we hold dearest hurt us the most. And I clearly see why it's important to prioritize things in life and let go of the cruft.

@CantoroMC
Copy link
Contributor
CantoroMC commented Oct 8, 2021

Hello!
I just update nnn since two weeks ago.

Commit d772223 (fix gitstatus and rebase patches), which coincide with tag: v4.3, broke the git patch (i only use the git patch so have no information on the other patches)

Description of the problem:

  • when i entered a git directory git "signs" are shown but they will persist, with a pattern that seems random to me, even when i navigate to parent directories.
  • Previously the left column was dedicated to sign for staged file, now the simbols for untracked (??) and ignored file (!!) are written to the left column (that was not the case with the previous patch)

@luukvbaal
Copy link
Collaborator
luukvbaal commented Oct 8, 2021

It's been a while since I made the change to the patch(just didn't push it) but it was supposed to improve the git signs representation, not break it.

when i entered a git directory git "signs" are shown but they will persist, with a pattern that seems random to me, even when i navigate to parent directories.

Could you show a screenrecording of what you mean? I've been using the new patch for the last few months but never encountered something that seems random.

Previously the left column was dedicated to sign for staged file, now the symbols for untracked (??) and ignored file (!!) are written to the left column (that was not the case with the previous patch)

The new patch indeed tries to show more information about directories when possible, showing i.e. ?M when a dir contains both new files and unstaged modified files. Staging them should change it to M?, letting you know that are staged modified files but also untracked files.

The new patch is taking advantage of the dual columns by not overwriting an already filled column while updating, which was previously the case. It shouldn't be incorrect or random though.

@CantoroMC
Copy link
Contributor
CantoroMC commented Oct 8, 2021

I post some picture:
I have taken as example the dotfiles directory present in my home folder; starting from the dotfiles directory and pressing h will bring my to the home directory.

Sorry, if I haven't embedded images

The difference between after and before of dotfiles directory show the problem reported on above post issue nr 2
Whereas, the difference between after and before of home directory show the persistence of symbols.

@luukvbaal
Copy link
Collaborator

What does the output of

git -c core.quotePath= status --porcelain --ignored=matching -u

look like in those directories?

@CantoroMC
Copy link
Contributor

Home directory is not a git directory so fatal: not a git repository (or any parent up to mount point /)
Dotfiles directory

R  deploy/arch-pkgs/bull/fairy-stockfish-bull-git-13.1.r6356.3af1cb67-1-x86_64.pkg.tar.zst -> deploy/arch-pkgs/bull/fairy-stockfish-bull-git-13.1.r6364.edb54396-1-x86_64.pkg.tar.zst
D  deploy/arch-pkgs/bull/neovim-bull-git-0.6.0r19076.270cc1d70-1-x86_64.pkg.tar.zst
A  deploy/arch-pkgs/bull/neovim-bull-git-0.6.0r19175.7f93b2ab0-1-x86_64.pkg.tar.zst
D  deploy/arch-pkgs/bull/nibbler-bull-git-2.1.6.r3288.602ee1c-1-x86_64.pkg.tar.zst
A  deploy/arch-pkgs/bull/nibbler-bull-git-2.1.6.r3314.d6a324b-1-x86_64.pkg.tar.zst
D  deploy/arch-pkgs/bull/nnn-bull-git-4.2.r3683.1723aeb4-1-x86_64.pkg.tar.zst
A  deploy/arch-pkgs/bull/nnn-bull-git-4.2.r3685.e74aa95e-1-x86_64.pkg.tar.zst
R  deploy/arch-pkgs/bull/stockfish-bull-git-14.r5329.21ad356c-1-x86_64.pkg.tar.zst -> deploy/arch-pkgs/bull/stockfish-bull-git-14.r5334.f21a66f7-1-x86_64.pkg.tar.zst
 M deploy/arch-pkgs/makepkg/nnn-git/PKGBUILD
 M neovim/.config/nvim/lua/mc/plugin/picasso/init.lua
M  neovim/.config/nvim/lua/mc/plugin/picasso/themes/srcery.lua
 M neovim/.local/share/nvim/site/spell/dictionary.utf-8.add
 M neovim/.local/share/nvim/site/spell/dictionary.utf-8.add.spl
 M shell/.zshenv
!! deploy/XMonad/Xwm/data/
!! deploy/XMonad/Xwm/dist-newstyle/
!! deploy/arch-pkgs/bull/bull.db
!! deploy/arch-pkgs/bull/bull.db.tar.zst
!! deploy/arch-pkgs/bull/bull.db.tar.zst.old
!! deploy/arch-pkgs/bull/bull.files
!! deploy/arch-pkgs/bull/bull.files.tar.zst
!! deploy/arch-pkgs/bull/bull.files.tar.zst.old
!! shell/.config/zsh/functions/Misc/async.zwc
!! shell/.config/zsh/functions/Prompts/prompt_voidy_setup.zwc
!! shell/.config/zsh/zlib/aliases.zsh.zwc
!! shell/.config/zsh/zlib/functions.zsh.zwc
!! shell/.config/zsh/zlib/navigation.zsh.zwc
!! shell/.config/zsh/zlib/termtitle.zsh.zwc
!! shell/.config/zsh/zlib/vcs.zsh.zwc
!! shell/.config/zsh/zlib/zbell.zsh.zwc
!! shell/.config/zsh/zlib/zcal.zsh.zwc
!! shell/.config/zsh/zlib/zcomple.zsh.zwc
!! shell/.config/zsh/zlib/zkbd.zsh.zwc
!! shell/.config/zsh/zlib/zopts.zsh.zwc
!! shell/.config/zsh/zlib/zplug.d/fzf-tab.zsh.zwc
!! shell/.config/zsh/zlib/zplug.d/zsh-autosuggestions.zsh.zwc
!! shell/.config/zsh/zlib/zplug.d/zsh-history-substring-search.zsh.zwc
!! shell/.config/zsh/zlib/zplug.d/zsh-syntax-highlighting.zsh.zwc
!! shell/.config/zsh/zlib/zplug.zsh.zwc
!! shell/.config/zsh/zlib/zvi.zsh.zwc

@luukvbaal
Copy link
Collaborator

Alright, I'm able to reproduce the issue. The issue pops up for directories not tracked by git.

My home directory is tracked by git so never noticed it 🤣

@CantoroMC
Copy link
Contributor

So, I'm right regarding the "persistence" but the second issue is instead a wanted behaviour?

@luukvbaal
Copy link
Collaborator

I would say so yeah. It's not showing any incorrect information, just more.

@CantoroMC
Copy link
Contributor

I understand your point of view, i was concerned of a possible mistake, due to the presence of the first mistake and because i remember then when the author of the patch posted it he/she stated that the sign resemble the output of git status -sb (hence the left column was for staging area and the right for unstaged area)

@luukvbaal
Copy link
Collaborator

https://github.com/luukvbaal/nnn/tree/gitstatus seems to fix it. Can you confirm?

Don't quite remember why I changed it in the first place.

@CantoroMC
Copy link
Contributor

No more sign in my home directory.

@CantoroMC
Copy link
Contributor

I would suggest also to not let coincide the new tag with a broken patch.

@luukvbaal
Copy link
Collaborator

stated that the sign resemble the output of git status -sb (hence the left column was for staging area and the right for unstaged area)

This is still true but git status -sb doesn't print any entries for cumulative changes in directories, just for separate files so this is where we differ and had to come up with a new strategy.

I think the new strategy shows the most information possible whereas the old one just discarded cumulative changes by overwriting the columns.

@luukvbaal
Copy link
Collaborator

I would suggest also to not let coincide the new tag with a broken patch.

I would agree, not sure how @jarun feels about it.

@N-R-K
Copy link
Collaborator
N-R-K commented Oct 8, 2021

I would suggest also to not let coincide the new tag with a broken patch.

Many package managers do hash-checks on tarballs. So I don't think you can just change tags around, if that's what you're suggesting.

@jarun
Copy link
Owner Author
jarun commented Oct 8, 2021

Yes, it would lead to downstream issues. Please wait for the next release.

@jarun jarun mentioned this issue Oct 10, 2021
17 tasks
@jarun
Copy link
Owner Author
jarun commented Oct 10, 2021

Rolled at #1193.

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

No branches or pull requests

6 participants
0