aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-23 21:14:00 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-23 21:19:58 -0700
commit5df8fab4637865cc895bc698410efedc765dfd8c (patch)
tree7d58455e26b7b7c0696fd48ed40711619bc25527 /doc_src
parentb8817215dcfa6a3d069ef77e43d116983c855982 (diff)
replace <outp> command with \outp in docs
Doxygen has been warning that `<outp>` and `</outp>` are not valid XML/HTML commands since commit cb6d5d76 on 20016-04-04. That's primarily because there is at present no way to tell Doxygen to recognize new XML/HTML tags. The actual errors look like this: ``` .../string.doxygen:187: warning: Unsupported xml/html tag </outp> found ``` I hate build errors since they a) cause needless concern, and b) make it harder to notice when I've introduced a new error. So switch from XML/C## style markup to Doxygen style markup for the "outp" annotation.
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/FORMATTING.md4
-rw-r--r--doc_src/index.hdr.in10
-rw-r--r--doc_src/prompt_pwd.txt8
-rw-r--r--doc_src/string.txt94
-rw-r--r--doc_src/tutorial.hdr100
-rw-r--r--doc_src/type.txt2
6 files changed, 109 insertions, 109 deletions
diff --git a/doc_src/FORMATTING.md b/doc_src/FORMATTING.md
index df6de6f8..4b4b2338 100644
--- a/doc_src/FORMATTING.md
+++ b/doc_src/FORMATTING.md
@@ -158,10 +158,10 @@ The following can be used in \\fish blocks to render some fish scenarios. These
- `<m>`: \<m\>Matched\</m\> items, such as tab completions.
- `<sm>`: Matched items \<sm\>searched\<sm\> for, like grep results.
- `<error>`: \<error\>This would be shown as an error.\</error\>
-- `<asis>`: \<asis\>This test will not be parsed for fish markup.\</asis\>
-- `<outp>`: \<outp\>This would be rendered as command/script output.\</outp\>
+- `<asis>`: \<asis\>This text will not be parsed for fish markup.\</asis\>
- `<bs>`: Render the contents with a preceding backslash. Useful when presenting output.
- `{{` and `}}`: Required when wanting curly braces in regular expression example.
+- `\\outp`: \\outp\{This would be rendered as command/script output.\}
### Prompts and cursors
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
index 7e889d8e..64ed2eb7 100644
--- a/doc_src/index.hdr.in
+++ b/doc_src/index.hdr.in
@@ -551,22 +551,22 @@ Lists adjacent to other lists or strings are expanded as cartesian products:
Examples:
\fish{cli-dark}
>_ echo {good,bad}" apples"
-<outp>good apples bad apples</outp>
+\outp{good apples bad apples}
>_ 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>
+\outp{x1 y1 z1 x2 y2 z2 x3 y3 z3}
>_ echo $a"-"$b
-<outp>x-1 y-1 z-1 x-2 y-2 z-2 x-3 y-3 z-3</outp>
+\outp{x-1 y-1 z-1 x-2 y-2 z-2 x-3 y-3 z-3}
>_ echo {x,y,z}$b
-<outp>x1 y1 z1 x2 y2 z2 x3 y3 z3</outp>
+\outp{x1 y1 z1 x2 y2 z2 x3 y3 z3}
>_ echo {$b}word
-<outp>1word 2word 3word</outp>
+\outp{1word 2word 3word}
\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`).
diff --git a/doc_src/prompt_pwd.txt b/doc_src/prompt_pwd.txt
index 0eafbf99..039efabb 100644
--- a/doc_src/prompt_pwd.txt
+++ b/doc_src/prompt_pwd.txt
@@ -16,16 +16,16 @@ To change the number of characters per path component, set $fish_prompt_pwd_dir_
\fish{cli-dark}
>_ cd ~/
>_ echo $PWD
-<outp>/home/alfa</outp>
+\outp{/home/alfa}
>_ prompt_pwd
-<outp>~</outp>
+\outp{~}
>_ cd /tmp/banana/sausage/with/mustard
>_ prompt_pwd
-<outp>/t/b/s/w/mustard</outp>
+\outp{/t/b/s/w/mustard}
>_ set -g fish_prompt_pwd_dir_length 3
>_ prompt_pwd
-<outp>/tmp/ban/sau/wit/mustard</outp>
+\outp{/tmp/ban/sau/wit/mustard}
\endfish
diff --git a/doc_src/string.txt b/doc_src/string.txt
index 58de93e4..5a7b6f37 100644
--- a/doc_src/string.txt
+++ b/doc_src/string.txt
@@ -53,7 +53,7 @@ The following subcommands are available:
\fish{cli-dark}
>_ string length 'hello, world'
-<outp>12</outp>
+\outp{12}
>_ set str foo
>_ string length -q $str; echo $status
@@ -63,42 +63,42 @@ The following subcommands are available:
\fish{cli-dark}
>_ string sub --length 2 abcde
-<outp>ab</outp>
+\outp{ab}
>_ string sub -s 2 -l 2 abcde
-<outp>bc</outp>
+\outp{bc}
>_ string sub --start=-2 abcde
-<outp>de</outp>
+\outp{de}
\endfish
\fish{cli-dark}
>_ string split . example.com
-<outp>example</outp>
-<outp>com</outp>
+\outp{example}
+\outp{com}
>_ string split -r -m1 / /usr/local/bin/fish
-<outp>/usr/local/bin</outp>
-<outp>fish</outp>
+\outp{/usr/local/bin}
+\outp{fish}
>_ string split '' abc
-<outp>a</outp>
-<outp>b</outp>
-<outp>c</outp>
+\outp{a}
+\outp{b}
+\outp{c}
\endfish
\fish{cli-dark}
>_ seq 3 | string join ...
-<outp>1...2...3</outp>
+\outp{1...2...3}
\endfish
\fish{cli-dark}
>_ string trim ' abc '
-<outp>abc</outp>
+\outp{abc}
>_ string trim --right --chars=yz xyzzy zany
-<outp>x</outp>
-<outp>zan</outp>
+\outp{x}
+\outp{zan}
\endfish
\fish{cli-dark}
@@ -110,78 +110,78 @@ The following subcommands are available:
\fish{cli-dark}
>_ string match '?' a
-<outp>a</outp>
+\outp{a}
>_ string match 'a*b' axxb
-<outp>axxb</outp>
+\outp{axxb}
>_ string match -i 'a??B' Axxb
-<outp>Axxb</outp>
+\outp{Axxb}
>_ echo 'ok?' | string match '*\\?'
->_ <outp>ok?</outp>
+>_ \outp{ok?}
>_ string match -r -v "c.*[12]" {cat,dog}(seq 1 4)
-<outp>dog1</outp>
-<outp>dog2</outp>
-<outp>cat3</outp>
-<outp>dog3</outp>
-<outp>cat4</outp>
-<outp>dog4</outp>
+\outp{dog1}
+\outp{dog2}
+\outp{cat3}
+\outp{dog3}
+\outp{cat4}
+\outp{dog4}
\endfish
\subsection string-example-match-regex Match Regex Examples
\fish{cli-dark}
>_ string match -r 'cat|dog|fish' 'nice dog'
-<outp>dog</outp>
+\outp{dog}
>_ string match -r '(\\d\\d?):(\\d\\d):(\\d\\d)' <asis>2:34:56</asis>
-<outp>2:34:56</outp>
-<outp>2</outp>
-<outp>34</outp>
-<outp>56</outp>
+\outp{2:34:56}
+\outp{2}
+\outp{34}
+\outp{56}
>_ string match -r '^(\\w{{2,4}})\\g1$' papa mud murmur
-<outp>papa</outp>
-<outp>pa</outp>
-<outp>murmur</outp>
-<outp>mur</outp>
+\outp{papa}
+\outp{pa}
+\outp{murmur}
+\outp{mur}
>_ string match -r -a -n at ratatat
-<outp>2 2</outp>
-<outp>4 2</outp>
-<outp>6 2</outp>
+\outp{2 2}
+\outp{4 2}
+\outp{6 2}
>_ string match -r -i '0x[0-9a-f]{{1,8}}' 'int magic = 0xBadC0de;'
-<outp>0xBadC0de</outp>
+\outp{0xBadC0de}
\endfish
\subsection string-example-replace-literal Replace Literal Examples
\fish{cli-dark}
>_ string replace is was 'blue is my favorite'
-<outp>blue was my favorite</outp>
+\outp{blue was my favorite}
>_ string replace 3rd last 1st 2nd 3rd
-<outp>1st</outp>
-<outp>2nd</outp>
-<outp>last</outp>
+\outp{1st}
+\outp{2nd}
+\outp{last}
>_ string replace -a ' ' _ 'spaces to underscores'
-<outp>spaces_to_underscores</outp>
+\outp{spaces_to_underscores}
\endfish
\subsection string-example-replace-Regex Replace Regex Examples
\fish{cli-dark}
>_ string replace -r -a '[^\\d.]+' ' ' '0 one two 3.14 four 5x'
-<outp>0 3.14 5</outp>
+\outp{0 3.14 5}
>_ string replace -r '(\\w+)\\s+(\\w+)' '$2 $1 $$' 'left right'
-<outp>right left $</outp>
+\outp{right left $}
>_ string replace -r '\\s*newline\\s*' '\\n' 'put a newline here'
-<outp>put a</outp>
-<outp>here</outp>
+\outp{put a}
+\outp{here}
\endfish
diff --git a/doc_src/tutorial.hdr b/doc_src/tutorial.hdr
index cb8427d4..9c94cca3 100644
--- a/doc_src/tutorial.hdr
+++ b/doc_src/tutorial.hdr
@@ -54,8 +54,8 @@ If you have a strong understanding of other shells, and want to know what `fish`
When you start `fish`, you should see this:
\fish{cli-dark}
-<outp>Welcome to fish, the friendly interactive shell</outp>
-<outp>Type <span class="cwd">help</span> for instructions on how to use fish</outp>
+\outp{Welcome to fish, the friendly interactive shell}
+\outp{Type <span class="cwd">help</span> for instructions on how to use fish}
<asis>you@hostname</asis> ~>____
\endfish
@@ -68,7 +68,7 @@ When you start `fish`, you should see this:
\fish{cli-dark}
>_ echo hello world
-<outp>hello world</outp>
+\outp{hello world}
\endfish
You can include a literal space in an argument with a backslash, or by using single or double quotes:
@@ -77,7 +77,7 @@ You can include a literal space in an argument with a backslash, or by using sin
>_ mkdir My\ Files
>_ cp ~/Some\ File 'My Files'
>_ ls "My Files"
-<outp>Some File</outp>
+\outp{Some File}
\endfish
Commands can be chained with semicolons.
@@ -89,8 +89,8 @@ Commands can be chained with semicolons.
\fish{cli-dark}
>_ man set
-<outp>set - handle shell variables</outp>
-<outp> Synopsis...</outp>
+\outp{set - handle shell variables}
+\outp{ Synopsis...}
\endfish
@@ -125,25 +125,25 @@ These colors, and many more, can be changed by running `fish_config`, or by modi
\fish{cli-dark}
>_ ls *.jpg
-<outp>lena.jpg</outp>
-<outp>meena.jpg</outp>
-<outp>santa maria.jpg</outp>
+\outp{lena.jpg}
+\outp{meena.jpg}
+\outp{santa maria.jpg}
\endfish
You can include multiple wildcards:
\fish{cli-dark}
>_ ls l*.p*
-<outp>lena.png</outp>
-<outp>lesson.pdf</outp>
+\outp{lena.png}
+\outp{lesson.pdf}
\endfish
Especially powerful is the recursive wildcard ** which searches directories recursively:
\fish{cli-dark}
>_ ls /var/**.log
-<outp>/var/log/system.log</outp>
-<outp>/var/run/sntp.log</outp>
+\outp{/var/log/system.log}
+\outp{/var/run/sntp.log}
\endfish
If that directory traversal is taking a long time, you can @key{Control,C} out of it.
@@ -155,7 +155,7 @@ You can pipe between commands with the usual vertical bar:
\fish{cli-dark}
>_ echo hello world | wc
-<outp> 1 2 12</outp>
+\outp{ 1 2 12}
\endfish
stdin and stdout can be redirected via the familiar &lt; and &gt;. Unlike other shells, stderr is redirected with a caret ^
@@ -201,7 +201,7 @@ If there's more than one possibility, it will list them:
\fish{cli-dark}
>_ <error>~/stuff/s</error> @key{Tab}
-<outp><m>~/stuff/s</m>cript.sh <i>(Executable, 4.8kB)</i> <m>~/stuff/s</m>ources/ <i>(Directory)</i></outp>
+\outp{<m>~/stuff/s</m>cript.sh <i>(Executable, 4.8kB)</i> <m>~/stuff/s</m>ources/ <i>(Directory)</i>}
\endfish
Hit tab again to cycle through the possibilities.
@@ -211,7 +211,7 @@ Hit tab again to cycle through the possibilities.
\fish{cli-dark}
>_ git merge pr @key{Tab} &rarr; git merge prompt_designer
>_ git checkout b @key{Tab}
-<outp><m>b</m>uiltin_list_io_merge <i>(Branch)</i> <m>b</m>uiltin_set_color <i>(Branch)</i> <m>b</m>usted_events <i>(Tag)</i></outp>
+\outp{<m>b</m>uiltin_list_io_merge <i>(Branch)</i> <m>b</m>uiltin_set_color <i>(Branch)</i> <m>b</m>usted_events <i>(Tag)</i>}
\endfish
Try hitting tab and see what `fish` can do!
@@ -222,16 +222,16 @@ Like other shells, a dollar sign performs variable substitution:
\fish{cli-dark}
>_ echo My home directory is $HOME
-<outp>My home directory is /home/tutorial</outp>
+\outp{My home directory is /home/tutorial}
\endfish
Variable substitution also occurs in double quotes, but not single quotes:
\fish{cli-dark}
>_ echo "My current directory is $PWD"
-<outp>My current directory is /home/tutorial</outp>
+\outp{My current directory is /home/tutorial}
>_ echo 'My current directory is $PWD'
-<outp>My current directory is $PWD</outp>
+\outp{My current directory is $PWD}
\endfish
Unlike other shells, `fish` has no dedicated syntax for setting variables. Instead it has an ordinary command: `set`, which takes a variable name, and then its value.
@@ -239,7 +239,7 @@ Unlike other shells, `fish` has no dedicated syntax for setting variables. Inste
\fish{cli-dark}
>_ set name 'Mister Noodle'
>_ echo $name
-<outp>Mister Noodle</outp>
+\outp{Mister Noodle}
\endfish
(Notice the quotes: without them, `Mister` and `Noodle` would have been separate arguments, and `$name` would have been made into a list of two elements.)
@@ -249,7 +249,7 @@ Unlike other shells, variables are not further split after substitution:
\fish{cli-dark}
>_ mkdir $name
>_ ls
-<outp>Mister Noodle</outp>
+\outp{Mister Noodle}
\endfish
In bash, this would have created two directories "Mister" and "Noodle". In `fish`, it created only one: the variable had the value "Mister Noodle", so that is the argument that was passed to `mkdir`, spaces and all. Other shells use the term "arrays", rather than lists.
@@ -262,7 +262,7 @@ Unlike other shells, `fish` stores the exit status of the last command in `$stat
\fish{cli-dark}
>_ false
>_ echo $status
-<outp>1</outp>
+\outp{1}
\endfish
Zero is considered success, and non-zero is failure.
@@ -275,7 +275,7 @@ Unlike other shells, `fish` does not have an export command. Instead, a variable
\fish{cli-dark}
>_ set -x MyVariable SomeValue
>_ env | grep MyVariable
-<outp><sm>MyVariable</sm>=SomeValue</outp>
+\outp{<sm>MyVariable</sm>=SomeValue}
\endfish
You can erase a variable with `-e` or `--erase`
@@ -283,7 +283,7 @@ You can erase a variable with `-e` or `--erase`
\fish{cli-dark}
>_ set -e MyVariable
>_ env | grep MyVariable
-<outp>(no output)</outp>
+\outp{(no output)}
\endfish
@@ -297,7 +297,7 @@ Other variables, like `$PATH`, really do have multiple values. During variable e
\fish{cli-dark}
>_ echo $PATH
-<outp>/usr/bin /bin /usr/sbin /sbin /usr/local/bin</outp>
+\outp{/usr/bin /bin /usr/sbin /sbin /usr/local/bin}
\endfish
Lists cannot contain other lists: there is no recursion. A variable is a list of strings, full stop.
@@ -306,7 +306,7 @@ Get the length of a list with `count`:
\fish{cli-dark}
>_ count $PATH
-<outp>5</outp>
+\outp{5}
\endfish
You can append (or prepend) to a list by setting the list to itself, with some additional arguments. Here we append /usr/local/bin to $PATH:
@@ -320,20 +320,20 @@ You can access individual elements with square brackets. Indexing starts at 1 fr
\fish{cli-dark}
>_ echo $PATH
-<outp>/usr/bin /bin /usr/sbin /sbin /usr/local/bin</outp>
+\outp{/usr/bin /bin /usr/sbin /sbin /usr/local/bin}
>_ echo $PATH[1]
-<outp>/usr/bin</outp>
+\outp{/usr/bin}
>_ echo $PATH[-1]
-<outp>/usr/local/bin</outp>
+\outp{/usr/local/bin}
\endfish
You can also access ranges of elements, known as "slices:"
\fish{cli-dark}
>_ echo $PATH[1..2]
-<outp>/usr/bin /bin</outp>
+\outp{/usr/bin /bin}
>_ echo $PATH[-1..2]
-<outp>/usr/local/bin /sbin /usr/sbin /bin</outp>
+\outp{/usr/local/bin /sbin /usr/sbin /bin}
\endfish
You can iterate over a list (or a slice) with a for loop:
@@ -342,11 +342,11 @@ You can iterate over a list (or a slice) with a for loop:
>_ for val in $PATH
echo "entry: $val"
end
-<outp>entry: /usr/bin/</outp>
-<outp>entry: /bin</outp>
-<outp>entry: /usr/sbin</outp>
-<outp>entry: /sbin</outp>
-<outp>entry: /usr/local/bin</outp>
+\outp{entry: /usr/bin/}
+\outp{entry: /bin}
+\outp{entry: /usr/sbin}
+\outp{entry: /sbin}
+\outp{entry: /usr/local/bin}
\endfish
Lists adjacent to other lists or strings are expanded as <a href="index.html#cartesian-product">cartesian products</a> unless quoted (see <a href="index.html#expand-variable">Variable expansion</a>):
@@ -355,11 +355,11 @@ Lists adjacent to other lists or strings are expanded as <a href="index.html#car
>_ set -l a 1 2 3
>_ set -l 1 a b c
>_ echo $a$1
-<outp>1a 2a 3a 1b 2b 3b 1c 2c 3c</outp>
+\outp{1a 2a 3a 1b 2b 3b 1c 2c 3c}
>_ echo $a" banana"
-<outp>1 banana 2 banana 3 banana</outp>
+\outp{1 banana 2 banana 3 banana}
>_ echo "$a banana"
-<outp>1 2 3 banana</outp>
+\outp{1 2 3 banana}
\endfish
This is similar to <a href="index.html#expand-brace">Brace expansion</a>.
@@ -370,7 +370,7 @@ Command substitutions use the output of one command as an argument to another. U
\fish{cli-dark}
>_ echo In (pwd), running (uname)
-<outp>In /home/tutorial, running FreeBSD</outp>
+\outp{In /home/tutorial, running FreeBSD}
\endfish
A common idiom is to capture the output of a command in a variable:
@@ -378,7 +378,7 @@ A common idiom is to capture the output of a command in a variable:
\fish{cli-dark}
>_ set os (uname)
>_ echo $os
-<outp>Linux</outp>
+\outp{Linux}
\endfish
Command substitutions are not expanded within quotes. Instead, you can temporarily close the quotes, add the command substitution, and reopen them, all in the same argument:
@@ -386,7 +386,7 @@ Command substitutions are not expanded within quotes. Instead, you can temporari
\fish{cli-dark}
>_ touch <i class="quote">"testing_"</i>(date +%s)<i class="quote">".txt"</i>
>_ ls *.txt
-<outp>testing_1360099791.txt</outp>
+\outp{testing_1360099791.txt}
\endfish
@@ -396,7 +396,7 @@ Unlike other shells, `fish` does not have special syntax like &amp;&amp; or || t
\fish{cli-dark}
>_ cp file1.txt file1_bak.txt; and echo "Backup successful"; or echo "Backup failed"
-<outp>Backup failed</outp>
+\outp{Backup failed}
\endfish
@@ -441,9 +441,9 @@ A `fish` function is a list of commands, which may optionally take arguments. Un
echo Hello $argv
end
>_ say_hello
-<outp>Hello</outp>
+\outp{Hello}
>_ say_hello everybody!
-<outp>Hello everybody!</outp>
+\outp{Hello everybody!}
\endfish
Unlike other shells, `fish` does not have aliases or special prompt syntax. Functions take their place.
@@ -452,7 +452,7 @@ You can list the names of all functions with the `functions` keyword (note the p
\fish{cli-dark}
>_ functions
-<outp>alias, cd, delete-or-exit, dirh, dirs, down-or-search, eval, export, fish_command_not_found_setup, fish_config, fish_default_key_bindings, fish_prompt, fish_right_prompt, fish_sigtrap_handler, fish_update_completions, funced, funcsave, grep, help, history, isatty, ls, man, math, nextd, nextd-or-forward-word, open, popd, prevd, prevd-or-backward-word, prompt_pwd, psub, pushd, seq, setenv, trap, type, umask, up-or-search, vared</outp>
+\outp{alias, cd, delete-or-exit, dirh, dirs, down-or-search, eval, export, fish_command_not_found_setup, fish_config, fish_default_key_bindings, fish_prompt, fish_right_prompt, fish_sigtrap_handler, fish_update_completions, funced, funcsave, grep, help, history, isatty, ls, man, math, nextd, nextd-or-forward-word, open, popd, prevd, prevd-or-backward-word, prompt_pwd, psub, pushd, seq, setenv, trap, type, umask, up-or-search, vared}
\endfish
You can see the source for any function by passing its name to `functions`:
@@ -473,10 +473,10 @@ While loops:
>_ while true
echo <i class="quote">"Loop forever"</i>
end
-<outp>Loop forever</outp>
-<outp>Loop forever</outp>
-<outp>Loop forever</outp>
-<outp>...</outp>
+\outp{Loop forever}
+\outp{Loop forever}
+\outp{Loop forever}
+\outp{...}
\endfish
For loops can be used to iterate over a list. For example, a list of files:
diff --git a/doc_src/type.txt b/doc_src/type.txt
index 2da88c94..7b5f7a9c 100644
--- a/doc_src/type.txt
+++ b/doc_src/type.txt
@@ -28,5 +28,5 @@ The following options are available:
\fish{cli-dark}
>_ type fg
-<outp>fg is a builtin</outp>
+\outp{fg is a builtin}
\endfish