diff --git a/Doxyfile.user b/Doxyfile.user
index 3f5f61499..09683abd4 100644
--- a/Doxyfile.user
+++ b/Doxyfile.user
@@ -257,10 +257,10 @@ ALIASES += "strg{1}=\1"
ALIASES += "sglq{1}='\1'"
ALIASES += "dblq{1}=\"\1\""
-ALIASES += "prmt{1}=\1 "
-ALIASES += "sgst{1}=\1"
-ALIASES += "eror{1}=\1"
-ALIASES += "curs{1}=\1"
+ALIASES += "prmt{1}="
+ALIASES += "sgst{1}="
+ALIASES += "eror{1}="
+ALIASES += "curs{1}="
ALIASES += "bold{1}=\1"
ALIASES += "emph{1}=\1"
diff --git a/doc_src/fish_lexicon_filter.in b/doc_src/fish_lexicon_filter.in
index d6f1e075a..4976d2f93 100644
--- a/doc_src/fish_lexicon_filter.in
+++ b/doc_src/fish_lexicon_filter.in
@@ -32,7 +32,7 @@
#.
# It's most easily tested by passing test strings into the compiled script:
#.
-# echo "Line to test" | ./fish_lexicon_filter
+# echo "/fish Line to test" | ./fish_lexicon_filter
#.
# The, at times, archiac looking regex is down to ensuring portable sed BREs
#.
@@ -137,7 +137,7 @@ t html
#.
# Comments:
# Capture full line comments
-/^[ ]*#.*$/ {
+/^ *#.*$/ {
# Assume any line starting with a # is complete
s//@blah{&}/
t
@@ -237,13 +237,34 @@ s/\n//g
# Find the initial command, and change any others to arguments, up to a |, ( or ;
# Assumes that a valid line will start with either a builtin, a function or a binary.
#.
-s/^\([ ]*\)@cmnd\(.*\)/\1@xcmd\
+# 'if' and 'for' seem to be special cases
+/@cmnd{if}/ {
+s//@xcmd\
+{if}/
+s/@cmnd{else}/@xcmd\
+{else}/
+s/@cmnd{not}/@xcmd\
+{not}/
+s/$}@cmnd{status}/$}status/
+b nextcmnd
+}
+/@cmnd{for}/ {
+s/@cmnd{for}/@xcmd\
+{for}/
+s/[[:<:]]in[[:>:]]/@args{in}/
+b castargs
+}
+
+#.
+# Find initial command
+#.
+s/^\( *\)@cmnd\(.*\)/\1@xcmd\
\2/
t castargs
-s/^\([ ]*\)@func\(.*\)/\1@xfnc\
+s/^\( *\)@func\(.*\)/\1@xfnc\
\2/
t castargs
-s/^\([ ]*\)@sbin\(.*\)/\1@xbin\
+s/^\( *\)@sbin\(.*\)/\1@xbin\
\2/
t castargs
:nextcmnd
@@ -270,22 +291,37 @@ t castargs
s/\n\([^@]*\)@sbin\(.*\)/\1@args\
\2/
t castargs
+s/\n\([^@]*\)@\(....\)\(.*\)/\1@\2\
+\3/
+t castargs
:cleancmd
s/xcmd/cmnd/g
s/xfnc/func/g
s/xbin/sbin/g
s/\n//g
-# Character Entities
#.
-# Mark up a few sesitive characters.
+# Remove any args after echo
+#.
+/@cmnd{echo}/ {
+s//\
+&\
+/
+:cleanecho
+s/\n\([^@]*\)@args{\([^}]*\)}/\1\2/
+t cleanecho
+s/\n//g
+w debug-lexicon.log
+}
+#.
+# Mark up sesitive character entities.
#.
:entities
s/\</g
s/>/\>/g
#.
# Uncomment the folowing two lines (ss) to log the final output, sent to Doxygen.
-s/^.*$/OUT : &/w debug-lexicon.log
-s/^OUT : //
+# s/^.*$/OUT : &/w debug-lexicon.log
+# s/^OUT : //
#.
# Lines are reassembled, so branch to end
b
@@ -306,8 +342,8 @@ s/\n$//
# characters. Basically the inverse of the 'patternflush' action, with
# additional trailing characters stripped.
x
-s/^[ ]*[^<][^@][^}]*$//
-s/^[ ]*[^<][^@][^\\]*[\\ ()]*\n//
+s/^ *[^<][^@][^}]*$//
+s/^ *[^<][^@][^\\]*[\\ ()]*\n//
:holdflush
s/}[)(\\ ][)(\\ ]*/}/
s/\n[];)|* -][^\\]*[\\]*//
@@ -335,7 +371,6 @@ s/\([A-Za-z*][A-Za-z]*\.[a-z0-9][a-z0-9]*\)/@fsfo{\1}/g
#.
# Manually add a few commands not harvested from source files.
#.
-s,[[:<:]]in[[:>:]],@args{in},g
s,[[:<:]]whoami[[:>:]],@sbin{whoami},g
s,[[:<:]]fishd[[:>:]],@sbin{fishd},g
#.
diff --git a/doc_src/user_doc.css b/doc_src/user_doc.css
index 124d51080..ce6172150 100644
--- a/doc_src/user_doc.css
+++ b/doc_src/user_doc.css
@@ -197,9 +197,11 @@ h1 > code, h2 > code, h3 > code {
.underline { text-decoration: underline; }*/
.synopsis {
- background-color: #fafafa;
border: none;
color: #333;
+ background-color: #fafafa;
+ /*color: #00afff;*/
+ /*background-color: #111;*/
}
/* Console variants */
.cli-dark {