aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/set.txt
diff options
context:
space:
mode:
authorGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-08 03:44:37 +0100
committerGravatar Mark Griffiths <mark@thebespokepixel.com>2014-09-03 14:43:26 +0100
commit509d152e5407856ce00833b931ef29c3d98c3573 (patch)
tree874dc078d0d978b00cf1964f681f612fe997ddbd /doc_src/set.txt
parent35e6fb3788dfd717d374647739cd8d0d790be96e (diff)
Tutorial auto colouring, Man page and Make fixes
Completely fixes #1557 and the underlying Doxygen changes that caused it. Should make fish docs simpler and more robust, more consistent and generally prettier. todo: - trap unmarked text as arguments in context - test & fix sed portability - see in particular. (so far tested on BSD (Mac) and GNU sed). - test Makefile changes - last round of aesthetic changes and getting that ascii fish in thereā€¦
Diffstat (limited to 'doc_src/set.txt')
-rw-r--r--doc_src/set.txt18
1 files changed, 10 insertions, 8 deletions
diff --git a/doc_src/set.txt b/doc_src/set.txt
index 4acbbf17..cbdd0f15 100644
--- a/doc_src/set.txt
+++ b/doc_src/set.txt
@@ -82,19 +82,21 @@ success, with a non-zero exit status if the commandline was invalid, if the
variable was write-protected or if the variable did not exist.
\subsection set-example Example
+\fish
+set -xg
+# Prints all global, exported variables.
-`set -xg` will print all global, exported variables.
-
-`set foo hi` sets the value of the variable foo to be hi.
+set foo hi
+# Sets the value of the variable $foo to be 'hi'.
-`set -e smurf` removes the variable `smurf`.
+set -e smurf
+# Removes the variable $smurf
-`set PATH[4] ~/bin` changes the fourth element of the `PATH` array to `~/bin`
+set PATH[4] ~/bin
+# Changes the fourth element of the $PATH array to ~/bin
-\fish
if set python_path (which python)
echo "Python is at $python_path"
end
+# Outputs the path to Python if `which` returns true.
\endfish
-
-The above outputs the path to Python if `which` returns true.