This adds initial support for statements with prefixed variable assignments.
Statments like this are supported:
a=1 b=$a echo $b # outputs 1
Just like in other shells, the left-hand side of each assignment must
be a valid variable identifier (no quoting/escaping). Array indexing
(PATH[1]=/bin ls $PATH) is *not* yet supported, but can be added fairly
easily.
The right hand side may be any valid string token, like a command
substitution, or a brace expansion.
Since `a=* foo` is equivalent to `begin set -lx a *; foo; end`,
the assignment, like `set`, uses nullglob behavior, e.g. below command
can safely be used to check if a directory is empty.
x=/nothing/{,.}* test (count $x) -eq 0
Generic file completion is done after the equal sign, so for example
pressing tab after something like `HOME=/` completes files in the
root directory
Subcommand completion works, so something like
`GIT_DIR=repo.git and command git ` correctly calls git completions
(but the git completion does not use the variable as of now).
The variable assignment is highlighted like an argument.
Closes#6048
This adds string-x.rst for each subcommand x of string. The main page
(string.rst) is not changed, except that examples are shown directly after
each subcommand. The subcommand sections in string.rst are created by
textual inclusion of parts of the string-x.rst files.
Subcommand man pages can be viewed with either of:
```
man string collect
man string-collect
string collect <press F1 or Alt-h>
string collect -h
```
While `string -h ...` still prints the full help.
Closes#5968
This removes the explicit html coloring that was used in the tutorial.
Where necessary we just add pseudo-html like `<red>...</red>` to
explain it to the users.
I don't know how to reintroduce coloring here, but it's not super
important as the user can always just check for themselves.
See #5696
[ci skip]
This adds support for `fish_trace`, a new variable intended to serve the
same purpose as `set -x` as in bash. Setting this variable to anything
non-empty causes execution to be traced. In the future we may give more
specific meaning to the value of the variable.
The user's prompt is not traced unless you run it explicitly. Events are
also not traced because it is noisy; however autoloading is.
Fixes#3427
This just makes more sense, as people don't want to enter exact
matches if they delete interactively.
It also brings it in line with "search".
Fixes#6142
Rejects #6070
Adds synopses for those commands missing them.
Moves all synopsis sections to code blocks. This improves the appearance, although highlighting as
fish code may not be the ideal appearance.
"space-delimited" sounds like you'd set it like `set
__fish_git_prompt_showupstream "auto verbose"`. This will not work.
It's a real actual proper list, which aren't space-delimited.
[ci skip]