-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bug: readline quoting breaks "keyname: function-name or macro" style #3611
Comments
A simple heuristic would be to consider that a key is a keyseq if it contains a backslash, and a keyname otherwise. I'm pretty confident that keynames can't contain backslashes, less confident about the other way around unfortunately. Does it make sense at all to define a binding for a keyseq without any modifiers? EDIT: at least it seems to work... If this can't be done I'd go with adding a new option |
Don't think that will always work. This is a valid
EDIT: |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
Kenames like `Control-n` should not be quoted or they don't work. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes #3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work. Keyseqs like `\C-p` or `ab` must continue to be quoted. See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Fixes nix-community#3611
#3947 does not fully resolve this. From the Readline manual:
The implementation in #3947 treats these character names as key sequences. For example, Just adding those names to the list at home-manager/modules/programs/readline.nix Lines 27 to 30 in d9b88b4
|
True! I made some of these points in the discussion in the PR, and read (and believe i linked to) the manual as well. |
Are you following the right branch?
Is there an existing issue for this?
Issue description
https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html
The (IMO) much more readable alternative to the "keyseq" style as used in the example:
home-manager/modules/programs/readline.nix
Line 34 in 275ab72
would be:
{ Control-h = "backward-kill-word"; }
Unfortunately the current implementation quotes
Control-h
and outputs"Control-h"
, which doesn't work. Obviously one could still put it inextraConfig
, but it would be nice if it didn't default to adding quotes that I didn't ask for.I think it makes sense to expect users to explicitly escape quotes if they want them, since it seems equally valid and more readable to not have them in many cases.
home-manager/modules/programs/readline.nix
Line 24 in 275ab72
It seems like the most straightforward backward-compatible way to go about this would be adding a new option (
keynames
?unquotedBindings
?) happy to make a PR if it seems reasonable.Maintainer CC
@vojta001
@rycee
System information
The text was updated successfully, but these errors were encountered: