mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 06:31:13 -03:00
completions/bind: don't suggest key names if --function-names is given
This combination makes no sense and should be an error. (Also the short options and --key-names were missing, so this was quite inconsistent.) See #11864
This commit is contained in:
@@ -60,7 +60,7 @@ complete -c bind -n __fish_bind_test2 -a '(bind --function-names)' -d 'Function
|
||||
|
||||
function __fish_bind_complete
|
||||
argparse M/mode= m/sets-mode= preset user s/silent \
|
||||
a/all function-names list-modes e/erase -- (commandline -xpc)[2..] 2>/dev/null
|
||||
a/all e/erase -- (commandline -xpc)[2..] 2>/dev/null
|
||||
or return 1
|
||||
set -l token (commandline -ct)
|
||||
if test (count $argv) = 0 && set -l prefix (string match -r -- '(.*,)?(ctrl-|alt-|shift-|super-)*' $token)
|
||||
|
||||
Reference in New Issue
Block a user