[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] negative arg trimming
From: |
Grisha Levit |
Subject: |
[PATCH] negative arg trimming |
Date: |
Tue, 21 Nov 2023 00:57:37 -0500 |
rl_trim_arg_from_keyseq fails to trim a negative argument entered with
universal-argument and fails to trim arguments if they have multiple
leading minus signs.
Also, when an argument is provided using universal-argument but without
typing any digits, rl_explicit_arg does not get set. Assuming that's
intentional, bash_execute_unix_command (and maybe other functions) can't
rely on tests like `if (count > 1 || rl_explicit_arg)' to check for an
argument since `count' is negative after `\C-u-'.
Example:
bind 'set bind-tty-special-chars off'
bind '"\C-u": universal-argument'
bind -x '"\eX": "declare -p READLINE_ARGUMENT"'
Followed any of: "\e--\eX" "\C-u-\eX" "\C-u--\eX", etc. all result in:
bash: bash_execute_unix_command: cannot find keymap for command
0001-negative-arg-trimming.patch
Description: Text Data
- [PATCH] negative arg trimming,
Grisha Levit <=