From 98ebb21489b3206ed745aadb821b400a9f3fa5c6 Mon Sep 17 00:00:00 2001 From: Mark Griffiths Date: Tue, 26 Aug 2014 19:19:24 +0100 Subject: [PATCH] Consistency fixes --- Doxyfile | 20 +++-- Doxyfile.help | 12 +-- Doxyfile.user | 4 +- Makefile.in | 11 +-- doc_src/bind.txt | 10 ++- doc_src/complete.txt | 16 +++- doc_src/count.txt | 2 - doc_src/faq.hdr | 18 +--- doc_src/functions.txt | 4 +- doc_src/index.hdr.in | 58 ++----------- doc_src/nextd.txt | 2 +- doc_src/psub.txt | 2 +- doc_src/set.txt | 6 +- doc_src/tutorial.hdr | 36 ++------ doc_src/user_doc.css | 6 +- lexicon_filter.in | 190 +++++++++++++++++++++++++++++++++--------- 16 files changed, 226 insertions(+), 171 deletions(-) diff --git a/Doxyfile b/Doxyfile index 38cbd687f..3eecb8628 100644 --- a/Doxyfile +++ b/Doxyfile @@ -216,7 +216,7 @@ SEPARATE_MEMBER_PAGES = NO # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. -TAB_SIZE = 8 +TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: @@ -228,14 +228,16 @@ TAB_SIZE = 8 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. +# Simplify Fish output from Doxygen for developer doc pages. (see lexicon_filter.in) + ALIASES = "key{1}=\1" -ALIASES += "key{2}=\1-\2" -ALIASES += "key{3}=\1-\3" +ALIASES += "key{2}=\1-\2" +ALIASES += "key{3}=\1-\3" ALIASES += "cursor_key{2}=\2" -ALIASES += "fish=\htmlonly[block] \n
"
-ALIASES += "fish{1}=\htmlonly[block] \n
"
-ALIASES += "endfish=
\endhtmlonly \n" +ALIASES += "fish=
"
+ALIASES += "fish{1}=
"
+ALIASES += "endfish=
\n" ALIASES += "asis{1}=\1" ALIASES += "outp{1}=\1" @@ -271,6 +273,8 @@ ALIASES += "undr{1}=\1" ALIASES += "span{2}=\2" ALIASES += "spcl{2}=\2" +ALIASES += "bksl{1}=\\\1" + # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. @@ -1677,7 +1681,7 @@ PAPER_TYPE = a4wide # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = bookmark # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1736,7 +1740,7 @@ USE_PDFLATEX = YES # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_BATCHMODE = NO +LATEX_BATCHMODE = YES # If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the # index chapters (such as File Index, Compound Index, etc.) in the output. diff --git a/Doxyfile.help b/Doxyfile.help index 7b9055726..018c9281c 100644 --- a/Doxyfile.help +++ b/Doxyfile.help @@ -228,12 +228,12 @@ TAB_SIZE = 4 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -# Simplify Fish output from Doxygen for man pages. (see fish_lexicon_filter) +# Simplify Fish output from Doxygen for man pages. (see lexicon_filter.in) -ALIASES = "key{1}=\1" -ALIASES += "key{2}=\1-\2" -ALIASES += "key{3}=\1-\3" -ALIASES += "cursor_key{2}=\2" +ALIASES = "key{1}=[\1]" +ALIASES += "key{2}=[\1-\2]" +ALIASES += "key{3}=[\1-\3]" +ALIASES += "cursor_key{2}=[\2]" ALIASES += "fish=
"
 ALIASES += "fish{1}=
"
@@ -273,6 +273,8 @@ ALIASES += "undr{1}=\1"
 ALIASES += "span{2}=\2"
 ALIASES += "spcl{2}=\2"
 
+ALIASES += "bksl{1}=\\\1"
+
 # This tag can be used to specify a number of word-keyword mappings (TCL only).
 # A mapping has the form "name=value". For example adding "class=itcl::class"
 # will allow you to use the command class in the itcl::class meaning.
diff --git a/Doxyfile.user b/Doxyfile.user
index b1319a786..6d9c2fcc6 100644
--- a/Doxyfile.user
+++ b/Doxyfile.user
@@ -228,7 +228,7 @@ TAB_SIZE               = 4
 # "Side Effects:". You can put \n's in the value part of an alias to insert
 # newlines.
 
-# Enhance Fish docs output from Doxygen. (See fish_lexicon_filter.in)
+# Enhance Fish docs output from Doxygen. (See lexicon_filter.in)
 
 ALIASES  = "key{1}=\1"
 ALIASES += "key{2}=\1-\2"
@@ -273,6 +273,8 @@ ALIASES += "undr{1}=\1"
 ALIASES += "span{2}=\2"
 ALIASES += "spcl{2}=\2"
 
+ALIASES += "bksl{1}=\\1"
+
 # This tag can be used to specify a number of word-keyword mappings (TCL only).
 # A mapping has the form "name=value". For example adding "class=itcl::class"
 # will allow you to use the command class in the itcl::class meaning.
diff --git a/Makefile.in b/Makefile.in
index afcba3c91..cdb6fbc53 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -285,10 +285,10 @@ doc: *.h *.cpp doc.h Doxyfile lexicon_filter
 #
 
 doc/refman.pdf: doc
-	cd doc/latex;
-	make;
-	mv refman.pdf ..;
-	cd ../..;
+	cd doc/latex; \
+	make; \
+	mv refman.pdf ..; \
+	cd ../..; \
 	rm -r doc/latex;
 
 
@@ -368,7 +368,8 @@ lexicon.txt: doc_src/commands.hdr $(FUNCTIONS_DIR_FILES) $(COMPLETIONS_DIR_FILES
 		-e "s|'\(.*\)'|func \1|p"; \
 	sed >lexicon.tmp -n \
 		-e '/set_default/s/.*\(fish_[a-z][a-z_]*\).*$$/clrv \1/p'; \
-	echo "sbin whoami\nsbin mkdir\nsbin basename" >> lexicon.tmp; \
+	sed >lexicon.tmp -n \
+		-e '/^#!#/s/^#!# \(.... [a-z][a-z_]*\)/\1/p'; \
 	mv lexicon.tmp lexicon.txt; rm -f lexicon_catalog.tmp lexicon_catalog.txt;
 
 #
diff --git a/doc_src/bind.txt b/doc_src/bind.txt
index 59a8dec5d..ff262ec69 100644
--- a/doc_src/bind.txt
+++ b/doc_src/bind.txt
@@ -89,7 +89,13 @@ The following special input functions are available:
 
 \subsection bind-example Examples
 
-`bind \cd 'exit'` causes `fish` to exit when @key{Control,D} is pressed.
+\fish
+bind \cd 'exit'
+\endfish
+Causes `fish` to exit when @key{Control,D} is pressed.
 
-`bind -k ppage history-search-backward` performs a history search when the @key{Page Up} key is pressed.
+\fish
+bind -k ppage history-search-backward
+\endfish
+Performs a history search when the @key{Page Up} key is pressed.
 
diff --git a/doc_src/complete.txt b/doc_src/complete.txt
index cb4e6bdef..c1422825d 100644
--- a/doc_src/complete.txt
+++ b/doc_src/complete.txt
@@ -50,21 +50,29 @@ When erasing completions, it is possible to either erase all completions for a s
 
 The short style option `-o` for the `gcc` command requires that a file follows it.  This can be done using writing:
 
-`complete -c gcc -s o -r`
+\fish
+complete -c gcc -s o -r
+\endfish
 
 The short style option `-d` for the `grep` command requires that one of the strings '`read`', '`skip`' or '`recurse`' is used.  This can be specified writing:
 
-`complete -c grep -s d -x -a "read skip recurse"`
+\fish
+complete -c grep -s d -x -a "read skip recurse"
+\endfish
 
 The `su` command takes any username as an argument. Usernames are given as the first colon-separated field in the file /etc/passwd. This can be specified as:
 
-`complete -x -c su -d "Username" -a "(cat /etc/passwd | cut -d : -f 1)"`
+\fish
+complete -x -c su -d "Username" -a "(cat /etc/passwd | cut -d : -f 1)"
+\endfish
 
 The `rpm` command has several different modes. If the `-e` or `--erase` flag has been specified, `rpm` should delete one or more packages, in which case several switches related to deleting packages are valid, like the `nodeps` switch.
 
 This can be written as:
 
-`complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d "Don't check dependencies"`
+\fish
+complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d "Don't check dependencies"
+\endfish
 
 where `__fish_contains_opt` is a function that checks the commandline buffer for the presence of a specified set of options.
 
diff --git a/doc_src/count.txt b/doc_src/count.txt
index 4587209fd..9f904311f 100644
--- a/doc_src/count.txt
+++ b/doc_src/count.txt
@@ -18,10 +18,8 @@ count $VARIABLE
 
 \fish
 count $PATH
-
 # Returns the number of directories in the users PATH variable.
 
 count *.txt
-
 # Returns the number of files in the current working directory ending with the suffix '.txt'.
 \endfish
\ No newline at end of file
diff --git a/doc_src/faq.hdr b/doc_src/faq.hdr
index 99c2ada49..fd3ed9765 100644
--- a/doc_src/faq.hdr
+++ b/doc_src/faq.hdr
@@ -7,37 +7,21 @@
 \endhtmlonly
 
 - How do I set or clear an environment variable?
-
 - How do I run a command every login? What's fish's equivalent to `.bashrc`?
-
 - How do I set my prompt?
-
 - How do I run a command from history?
-
 - How do I run a subcommand? The backtick doesn't work!
-
 - How do I get the exit status of a command?
-
 - How do I set an environment variable for just one command?
-
 - How do I customize my syntax highlighting colors?
-
 - How do I update man page completions?
-
 - Why does cd, pwd and other fish commands always resolve symlinked directories to their canonical path?
-
 - I accidentally entered a directory path and fish changed directory. What happened?
-
 - The open command doesn't work.
-
 - How do I make fish my default shell?
-
 - I'm seeing weird output before each prompt when using screen. What's wrong?
-
 - How do I change the greeting message?
-
 - Why doesn't history substitution ("!$" etc.) work?
-
 - How do I uninstall fish?
 
 \htmlonly[block]
@@ -81,7 +65,7 @@ You can also use the Web configuration tool, \\a' escapes the alert character
-
 - '\\b' escapes the backspace character
-
 - '\\e' escapes the escape character
-
 - '\\f' escapes the form feed character
-
 - '\\n' escapes a newline character
-
 - '\\r' escapes the carriage return character
-
 - '\\t' escapes the tab character
-
 - '\\v' escapes the vertical tab character
-
 - '\\ ' escapes the space character
-
 - '\\$' escapes the dollar character
-
 - '\\\\' escapes the backslash character
-
 - '\\*' escapes the star character
-
 - '\\?' escapes the question mark character
-
 - '\\~' escapes the tilde character
-
 - '\\%' escapes the percent character
-
 - '\\#' escapes the hash character
-
 - '\\(' escapes the left parenthesis character
-
 - '\\)' escapes the right parenthesis character
-
 - '\\{' escapes the left curly bracket character
-
 - '\\}' escapes the right curly bracket character
-
 - '\\[' escapes the left bracket character
-
 - '\\]' escapes the right bracket character
-
 - '\\' escapes the less than character
-
 - '\\\>' escapes the more than character
-
 - '\\^' escapes the circumflex character
-
 - '\\&' escapes the ampersand character
-
 - '\\;' escapes the semicolon character
-
 - '\\"' escapes the quote character
-
 - '\\'' escapes the apostrophe character
 
 - '\\xxx', where xx is a hexadecimal number, escapes the ascii character with the specified value. For example, `\x9` is the tab character.
@@ -163,9 +129,7 @@ the tab character
 Most programs use three input/output (IO) streams, each represented by a number called a file descriptor (FD). These are:
 
 - Standard input, FD 0, for reading, defaults to reading from the keyboard.
-
 - Standard output, FD 1, for writing, defaults to writing to the screen.
-
 - Standard error, FD 2, for writing errors and warnings, defaults to writing to the screen.
 
 The reason for providing for two output file descriptors is to allow
@@ -432,11 +396,11 @@ When an argument for a program is given on the commandline, it undergoes the pro
 
 If a star (`*`) or a question mark (`?`) is present in the parameter, `fish` attempts to match the given parameter to any files in such a way that:
 
-- '`?`' can match any single character except '/'.
+- `?` can match any single character except '/'.
 
-- '`*`' can match any string of characters not containing '/'. This includes matching an empty string.
+- `*` can match any string of characters not containing '/'. This includes matching an empty string.
 
-- '`**`' matches any string of characters. This includes matching an empty string. The string may include the '/' character but does not need to.
+- `**` matches any string of characters. This includes matching an empty string. The string may include the `/` character but does not need to.
 
 Wildcard matches are sorted case insensitively. When sorting matches containing numbers, consecutive digits are considered to be one element, so that the strings '1' '5' and '12' would be sorted in the order given.
 
@@ -613,13 +577,9 @@ All of the above expansions can be combined. If several expansions result in mor
 When combining multiple parameter expansions, expansions are performed in the following order:
 
 - Command substitutions
-
 - Variable expansions
-
 - Bracket expansion
-
 - Pid expansion
-
 - Wildcard expansion
 
 Expansions are performed from right to left, nested bracket expansions are performed from the inside and out.
@@ -653,6 +613,7 @@ There are three kinds of variables in fish: universal, global and local variable
 Variables can be explicitly set to be universal with the `-U` or `--universal` switch, global with the `-g` or `--global` switch, or local with the `-l` or `--local` switch.  The scoping rules when creating or updating a variable are:
 
 -# If a variable is explicitly set to either universal, global or local, that setting will be honored. If a variable of the same name exists in a different scope, that variable will not be changed.
+
 -# If a variable is not explicitly set to be either universal, global or local, but has been previously defined, the variable scope is not changed.
 
 -# If a variable is not explicitly set to be either universal, global or local and has never before been defined, the variable will be local to the currently executing function. Note that this is different from using the `-l` or `--local` flag. If one of those flags is used, the variable will be local to the most inner currently executing block, while without these the variable will be local to the function. If no function is executing, the variable will be global.
@@ -685,7 +646,7 @@ To see universal variables in action, start two fish sessions side by side, and
 
 When calling a function, all current local variables temporarily disappear. This shadowing of the local scope is needed since the variable namespace would become cluttered, making it very easy to accidentally overwrite variables from another function.
 
-For example, the following code will output '`Avast, mateys`':
+For example:
 
 \fish
 function shiver
@@ -700,6 +661,8 @@ function avast
     echo $phrase
 end
 avast
+
+# Outputs "Avast, mateys"
 \endfish
 
 
@@ -1057,11 +1020,8 @@ end
 Detected errors include:
 
 - Non existing commands.
-
 - Reading from or appending to a non existing file.
-
 - Incorrect use of output redirects
-
 - Mismatched parenthesis
 
 
@@ -1118,13 +1078,9 @@ If a function named `fish_greeting` exists, it will be run when entering interac
 When defining a new function in fish, it is possible to make it into an event handler, i.e. a function that is automatically run when a specific event takes place. Events that can trigger a handler currently are:
 
 - When a signal is delivered
-
 - When a process or job exits
-
 - When the value of a variable is updated
-
 - When the prompt is about to be shown
-
 - When a command lookup fails
 
 Example:
diff --git a/doc_src/nextd.txt b/doc_src/nextd.txt
index 96daf18ce..8d7c90350 100644
--- a/doc_src/nextd.txt
+++ b/doc_src/nextd.txt
@@ -2,7 +2,7 @@
 
 \subsection nextd-synopsis Synopsis
 \fish{synopsis}
-nextd [-l | --list] [POS]
+nextd [ -l | --list ] [POS]
 \endfish
 
 \subsection nextd-description Description
diff --git a/doc_src/psub.txt b/doc_src/psub.txt
index 12f1b620a..e6347d851 100644
--- a/doc_src/psub.txt
+++ b/doc_src/psub.txt
@@ -2,7 +2,7 @@
 
 \subsection psub-synopsis Synopsis
 \fish{synopsis}
-COMMAND1 (COMMAND2 | psub [-f])
+COMMAND1 ( COMMAND2 | psub [-f] )
 \endfish
 
 \subsection psub-description Description
diff --git a/doc_src/set.txt b/doc_src/set.txt
index 0dae90103..0b3d84173 100644
--- a/doc_src/set.txt
+++ b/doc_src/set.txt
@@ -5,9 +5,9 @@
 set [SCOPE_OPTIONS]
 set [OPTIONS] VARIABLE_NAME VALUES...
 set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
-set (-q | --query) [SCOPE_OPTIONS] VARIABLE_NAMES...
-set (-e | --erase) [SCOPE_OPTIONS] VARIABLE_NAME
-set (-e | --erase) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
+set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES...
+set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME
+set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
 \endfish
 
 \subsection set-description Description
diff --git a/doc_src/tutorial.hdr b/doc_src/tutorial.hdr
index 94cca97ba..aa67cf606 100644
--- a/doc_src/tutorial.hdr
+++ b/doc_src/tutorial.hdr
@@ -5,49 +5,27 @@