diff options
author | Mark Griffiths <mark@thebespokepixel.com> | 2016-04-04 13:43:37 +0100 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-04-04 15:23:56 -0700 |
commit | cb6d5d76c8232264f66c9a1db895d9dd69d77bc3 (patch) | |
tree | d92b384942073d335c288744fb70dacbfc8ff0d2 /doc_src/index.hdr.in | |
parent | 47f1a92cc4c3c7056f4172974f10a8dd402cf55c (diff) |
update lexicon for latest docs
Closes #2699
Fixes issues with:
* 'string' function synopsis
* Redirection display issues
* Better file & path detection
* Rendering of % & @ chars in both html and man
* @ symbol in tutorial
Improves robustness by implementing an @EOL marker to prevent hold buffer dumping extra chars after the end of an expression.
Added new '{{' and '}}' meta-chars for when you want curly braces in a regexp that was previously tripping up the lexicon.
Improve man/html presentation consistency for
* string
* printf
* prompt_pwd
* type
Use cli-styling for 'practical' examples.
Add <bs> tag for presenting content with preceding backslash.
Signed-off-by: Mark Griffiths <mark@thebespokepixel.com>
Diffstat (limited to 'doc_src/index.hdr.in')
-rw-r--r-- | doc_src/index.hdr.in | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 15c67c37..a42fb649 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -528,22 +528,24 @@ The above code demonstrates how to use multiple '`$`' symbols to expand the valu Lists adjacent to other lists or strings are expanded as cartesian products: Examples: -\fish -echo {good,bad}" apples" -# Outputs 'good apples bad apples' +\fish{cli-dark} +>_ echo {good,bad}" apples" +<outp>good apples bad apples</outp> + +>_ set -l a x y z +>_ set -l b 1 2 3 + +>_ echo $a$b +<outp>x1 y1 z1 x2 y2 z2 x3 y3 z3</outp> -set -l a x y z -set -l b 1 2 3 -echo $a$b -# Outputs 'x1 y1 z1 x2 y2 z2 x3 y3 z3' -echo $a"-"$b -# Outputs 'x-1 y-1 z-1 x-2 y-2 z-2 x-3 y-3 z-3' +>_ echo $a"-"$b +<outp>x-1 y-1 z-1 x-2 y-2 z-2 x-3 y-3 z-3</outp> -echo {x,y,z}$b -# Outputs 'x1 y1 z1 x2 y2 z2 x3 y3 z3' +>_ echo {x,y,z}$b +<outp>x1 y1 z1 x2 y2 z2 x3 y3 z3</outp> -echo {$b}word -# Outputs '1word 2word 3word' +>_ echo {$b}word +<outp>1word 2word 3word</outp> \endfish Be careful when you try to use braces to separate variable names from text. The dangers noted in the last example above can be avoided by wrapping the variable in double quotes instead of braces (`echo "$b"word`). |