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

Insert key is absent from bind #20

Closed
roadkell opened this issue Sep 22, 2023 · 4 comments · May be fixed by #23
Closed

Insert key is absent from bind #20

roadkell opened this issue Sep 22, 2023 · 4 comments · May be fixed by #23
Labels
bug Something isn't working

Comments

@roadkell
Copy link

Describe the bug

Insert key is absent from functions/bind.

Steps To Reproduce

Any bind command involving Insert key (^[[2~).

Expected behavior

❯ bind -n '^[[2~'
"^[[2~"   Insert

❯ bind -n '^[[2;2~'
"^[[2;2~"   Shift-Insert

etc.

Observed behavior

❯ bind -n '^[[2~'
"^[[2~"   Shift-

❯ bind -n '^[[2;2~'
"^[[2;2~"   Alt-[ + 2 + ; + 2 + ~

etc.

Environment:

  • OS: Pop!_OS 22.04 LTS x86_64
  • Terminal: kitty 0.24.1
  • Zsh version: 5.8.1
  • Repo version: * main 9eb2869 Don't overwrite Autosuggest's default ignore list

Additional context

Seems to be fairly simple to fix (add ( '[2;' ) name+='Insert' to the case-matches). Should i make a PR?
(I'm just not sure what does 1 mean here. Is this a typo? Also, all the regex magic in bind is so awesome it blows my mind).

@roadkell roadkell added the bug Something isn't working label Sep 22, 2023
@marlonrichert
Copy link
Owner

marlonrichert commented Oct 18, 2023

Should i make a PR?

That would be nice. 🙂

I'm just not sure what does 1 mean here. Is this a typo?

No, not a typo. For example:

% bind -n "^[[1;2A"
"^[[1;2A"   Shift-Up
%

Also, all the regex magic in bind is so awesome it blows my mind.

It's not regex. They're glob patterns. 🙂

@roadkell
Copy link
Author

Oh, now it makes sense, thanks. )

Hmm, but shouldn't there be ABCDFHZ instead of ABCDFH here, and F instead of E here? At least, it seems to work if fixed:

❯ bind -n '^[[F'
"^[[F"   End
❯ bind -n '^[[Z'
"^[[Z"   Shift-Tab

while the current version doesn't:

❯ bind -n '^[[F'
"^[[F"
❯ bind -n '^[[Z'
"^[[Z"   Alt-[ + Shift-Z

marlonrichert added a commit that referenced this issue Dec 14, 2023
@marlonrichert
Copy link
Owner

Good catch. Thanks! I've now fixed it.

roadkell pushed a commit to roadkell/zsh-edit that referenced this issue Dec 15, 2023
roadkell added a commit to roadkell/zsh-edit that referenced this issue Dec 15, 2023
@roadkell
Copy link
Author

Nice! Now, about that Insert key thing... )

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants