The newly added `:` command is implemented as a function (to avoid
increasing complexity by making it a builtin), but it is saved to a path
that does not match its filename (since its name is somewhat of a
special character that might cause problems during installation).
Directly probing the `colon` function for autoload causes `:` to be
correctly loaded, so doing just that after function paths are loaded
upon startup.
This is a hack since the CPP code shouldn't really be aware of
individual functions, perhaps there is a better way of doing this.
no-op function for compatibility with sh, bash, and others.
Often used to insert a comment into a chain of commands without having
it eat up the remainder of the line, handy in Makefiles.
Fixes an issue introduced in 4414d5c8885b5cd53c7ab42f70bd2824050907f0
where functions loaded from custom directories are not detected as being
valid for purposes of determining whether or not completions should be
called.
Restore localization to tokenizer error strings Work around #4810 by retrieving localizations at runtime to avoid issues possibly caused by inserting into the static unordered_map during static initialization. Closes#810.
Work around #4810 by retrieving localizations at runtime to avoid issues
possibly caused by inserting into the static unordered_map during static
initialization.
Closes#810.
INSTALL_DOCS is not a controllable option, and is only used to indicate
whether they will be installed or not.
This reverts commit e800b18ee98a75f59c6eaa03d89525cf9aba47af.
- Cache translations instead of calling `gettext` once per file
- Only do the ":/" thing if the file isn't in $PWD/**
For a git repo created like
```fish
git init
touch a(seq 0 1000)b
```
this changes the time from about 2s to 0.3s.
`git rm --cached` is often used to delete a file that no longer exists
in the working tree but remains in git's index. `git ls-files` will list
files that are in the HEAD, which is exactly what we want. Local files
not in `HEAD` can't be deleted from git anyway.
This reverts commit 2cdacbdce4c9909f294dce5d350b9cf3130eddb0.
Our fish scripts need to be audited for compliance before this can be
safely merged. cc @faho
Line continuations (i.e. escaped new lines) now make sense again. With
the smart pipe support (pipes continue on to next line) recently added,
this hack to have continuations ignore comments makes no sense.
This is valid code:
```fish
echo hello |
# comment here
tr -d 'l'
```
this isn't:
```fish
echo hello | \
# comment here
tr -d 'l'
```
Reverts @snnw's 318daaffb2d2551523a84acaaab57d79deb1cf22
Closes#2928. Closes#2929.
The tool subcommand had a "-f" flag to disallow file completions which is wrong: most of the tools there require a file/directory argument.
Since we're here, also limit "go tool compile" to only match Go source files.
From the discussion in #3802, handling spaces within braces more
gracefully. Leading and trailing whitespace that isn't quoted or escaped
is stripped, whitespace in the middle is preserved. Any whitespace
encountered within expansion tokens is treated as a single space,
similar to how programming languages that don't hard break tokens/quotes
on line endings would.