mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-16 05:32:45 +08:00
![]() Unlike other builtins, "{" is a separate token, not a keyword-string token. Allow the left brace token as command string; produce it when parsing "{ -h"/"{ --help" (and nowhere else). By using a decorated statement, we reuse logic for redirections etc. Other syntax elements like "and" are in the builtin list, which - adds highlighting logic - adds it to "builtin --names" - makes it runnable as builtin (e.g. "builtin '{'" would hypothetically print the man page) These don't seem very important (highlighting for '{' needs to match '}' anyway). Additionally, making it a real builtin would mean that we'd need to deactivate a few places that unescape "{" to BRACE_BEGIN. Let's not add it to the built in list. Instead, simply synthesize builtin_generic in the right spot. I'm assuming we want "{ -h" to print help, but '"{" -h' to run an external command, since the latter is historical behavior. This works naturally with the above fake builtin approach which never tries to unescape the left brace. |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish |