Re: bind allows "impossible" key bindings without warning

2025-01-03 Thread Koichi Murase
2025年1月4日(土) 1:04 Hauke Laging : > Currently you can bind key sequences which (in that situation) cannot be > activated. You can activate it by setting a longer time to keyseq-timeout. $ bind 'set keyseq-timeout 1000' $ bind '"\C-h": "hello"' $ bind '"\C-hw": "world"' With this setup, you can pr

Re: bind allows "impossible" key bindings without warning

2025-01-03 Thread Hauke Laging
Am 03.01.25 um 17:29 schrieb Koichi Murase: If Bash starts to output warning messages, it would be annoying for the users who intentionally set up keybindings with a timeout. Do you agree that this is not a relevant problem for commands which are read in an interactive shell? An additional sa

Re: bind allows "impossible" key bindings without warning

2025-01-03 Thread Chet Ramey
On 1/3/25 11:04 AM, Hauke Laging wrote: This happened to me: I defined a key binding consisting of a control key and a regular key (C-h IIRC but that does not matter). They're not impossible, simply ambiguous. Readline waits a half second for an additional disambiguating character by default.

Re: bind allows "impossible" key bindings without warning

2025-01-03 Thread Dale R. Worley
It does seem like "bind" could be improved by providing an option that shows all of the keysequences and what they are bound to. Currently, there seem to be several options for listing different types of bindings, but they all seem to be conceptually oriented toward "I am thinking of an action, wh

Re: bind allows "impossible" key bindings without warning

2025-01-03 Thread Andreas Schwab
On Jan 03 2025, Dale R. Worley wrote: > It does seem like "bind" could be improved by providing an option that > shows all of the keysequences and what they are bound to. bind -p | sort -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA

bind allows "impossible" key bindings without warning

2025-01-03 Thread Hauke Laging
Hello, I suggest a modification to the bind builtin. Currently you can bind key sequences which (in that situation) cannot be activated. This may be useful in very special circumstances so I do not suggest to make this impossible. Instead I suggest to print a warning (and maybe change the exit c