mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 03:51:20 -03:00
Add string to reserved keywords
Since `string match` now creates variables, wrapping `string` necessarily breaks things, so we need to disallow it. See #7459, #7509.
This commit is contained in:
@@ -681,3 +681,11 @@ echo $status
|
||||
yes | string replace -q y n
|
||||
echo $status
|
||||
# CHECK: 0
|
||||
|
||||
# `string` can't be wrapped properly anymore, since `string match` creates variables:
|
||||
function string
|
||||
builtin string $argv
|
||||
end
|
||||
# CHECKERR: checks/string.fish (line {{\d+}}): function: The name 'string' is reserved, and cannot be used as a function name
|
||||
# CHECKERR: function string
|
||||
# CHECKERR: ^
|
||||
|
||||
Reference in New Issue
Block a user