mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-04 04:31:14 -03:00
Reserve some builtin names
`argparse`, `read`, `set`, `status`, `test` and `[` now can't be used as function names anymore. This is because (except for `test` and `[`) there is no way to wrap these properly, so any function called that will be broken anyway. For `test` (and `[`), there is nothing that can be added and there have been confused users who created a function that then broke everything. Fixes #3000.
This commit is contained in:
@@ -22,3 +22,10 @@ function name5 abc --argument-names def ; end
|
||||
|
||||
####################
|
||||
# Checking that the copied functions are identical other than the name
|
||||
|
||||
####################
|
||||
# Checking reserved names
|
||||
fish: function: The name 'test' is reserved,
|
||||
and can not be used as a function name
|
||||
function test; echo banana; end
|
||||
^
|
||||
|
||||
Reference in New Issue
Block a user