mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-13 17:34:00 +08:00
f1d40a3c7c
The bind mode names can be, and are, used in the construction of fish variable names. So don't allow users to use names that are not legal as a variable name. This should not break anything since, AFAICT, no existing fish scripts, including those provided by Oh-My-Fish and Fisherman define bind modes that would not be legal with this change. Fixes #3965
12 lines
442 B
Fish
12 lines
442 B
Fish
# Test various `bind` command invocations. This is meant to verify that
|
|
# invalid flags, mode names, etc. are caught as well as to verify that valid
|
|
# ones are allowed.
|
|
|
|
echo \# Verify that an invalid bind mode is rejected. >&2
|
|
bind -m 'bad bind mode' \cX true
|
|
echo \# Verify that an invalid bind mode target is rejected. >&2
|
|
bind -M bind-mode \cX true
|
|
|
|
# This should succeed and result in a success, zero, status.
|
|
bind -M bind_mode \cX true
|