fish-shell/sphinx_doc_src
Johannes Altmanninger 7d5b44e828 Support FOO=bar syntax for passing variables to individual commands
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
2019-11-25 09:20:51 +01:00
..
_static sphinx: honor changes in static html assets 2019-10-19 14:52:24 +02:00
cmds Support FOO=bar syntax for passing variables to individual commands 2019-11-25 09:20:51 +01:00
commands.rst docs: Remove explicit .html links 2019-04-30 13:11:33 +02:00
conf.py sphinx docs: put search box above TOC 2019-11-05 08:47:06 +01:00
design.rst docs: Remove explicit .html links 2019-04-30 13:11:33 +02:00
faq.rst Support FOO=bar syntax for passing variables to individual commands 2019-11-25 09:20:51 +01:00
fish_indent_lexer.py Reformat all files 2019-05-05 12:09:25 +02:00
index.rst Add individual documentation pages for string's subcommands 2019-11-07 09:54:25 +01:00
license.rst Update copyright information 2019-08-08 18:47:36 +02:00
tutorial.rst docs/tutorial: Fix formatting 2019-11-04 20:08:45 +01:00