diff --git a/.gitignore b/.gitignore index 492c57582..2fe2f2152 100644 --- a/.gitignore +++ b/.gitignore @@ -30,14 +30,15 @@ share/man/ toc.txt user_doc/ xcuserdata +fish.xccheckout tests/*tmp.* tests/foo.txt FISH-BUILD-VERSION-FILE version messages.pot lexicon.txt -doc_src/fish_lexicon_filter -debug-lexicon.log +lexicon_filter +lexicon-debug.log Fish-Shell.sublime-workspace Fish-Shell.sublime-project diff --git a/Doxyfile b/Doxyfile index 3cd016639..38cbd687f 100644 --- a/Doxyfile +++ b/Doxyfile @@ -228,8 +228,48 @@ TAB_SIZE = 8 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = "fish=\n
"
+ALIASES += "fish{1}=\htmlonly[block] \n"
+ALIASES += "endfish=
\endhtmlonly \n"
+
+ALIASES += "asis{1}=\1"
+ALIASES += "outp{1}=\1"
+ALIASES += "blah{1}=#\1"
+ALIASES += "cmnd{1}=\1"
+ALIASES += "func{1}=\1"
+ALIASES += "sbin{1}=\1"
+ALIASES += "args{1}=\1"
+ALIASES += "opts{1}=\1"
+ALIASES += "vars{1}=\1"
+ALIASES += "optr{1}=\1"
+ALIASES += "redr{1}=\1"
+ALIASES += "fsfo{1}=\1"
+ALIASES += "path{1}=\1"
+ALIASES += "clrv{1}=\1"
+
+ALIASES += "strg{1}=\1"
+ALIASES += "sglq{1}='\1'"
+ALIASES += "dblq{1}=\"\1\""
+
+ALIASES += "prmt=>"
+ALIASES += "prmt{1}=\1>"
+ALIASES += "sgst{1}=\1"
+ALIASES += "mtch{1}=\1"
+ALIASES += "smtc{1}=\1"
+ALIASES += "eror{1}=\1"
+ALIASES += "curs=_"
+ALIASES += "curs{1}=\1"
+
+ALIASES += "bold{1}=\1"
+ALIASES += "emph{1}=\1"
+ALIASES += "undr{1}=\1"
+ALIASES += "span{2}=\2"
+ALIASES += "spcl{2}=\2"
# 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"
diff --git a/Doxyfile.help b/Doxyfile.help
index 746733827..7b9055726 100644
--- a/Doxyfile.help
+++ b/Doxyfile.help
@@ -230,43 +230,48 @@ TAB_SIZE = 4
# Simplify Fish output from Doxygen for man pages. (see fish_lexicon_filter)
-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}="
-ALIASES += "endfish=
"
+ALIASES += "fish="
+ALIASES += "fish{1}="
+ALIASES += "endfish=
"
-ALIASES += "asis{1}=\1"
-ALIASES += "blah{1}=\1"
-ALIASES += "cmnd{1}=\b \1"
-ALIASES += "func{1}=\b \1"
-ALIASES += "sbin{1}=\b \1"
-ALIASES += "args{1}=\1"
-ALIASES += "opts{1}=\1"
-ALIASES += "vars{1}=\1"
-ALIASES += "optr{1}=\1"
-ALIASES += "redr{1}=\1"
-ALIASES += "fsfo{1}=\1"
-ALIASES += "path{1}=\1"
-ALIASES += "clrv{1}=\1"
+ALIASES += "asis{1}=\1"
+ALIASES += "outp{1}=\1"
+ALIASES += "blah{1}= \1"
+ALIASES += "cmnd{1}=\1"
+ALIASES += "func{1}=\1"
+ALIASES += "sbin{1}=\1"
+ALIASES += "args{1}=\1"
+ALIASES += "opts{1}=\1"
+ALIASES += "vars{1}=\1"
+ALIASES += "optr{1}=\1"
+ALIASES += "redr{1}=\1"
+ALIASES += "fsfo{1}=\1"
+ALIASES += "path{1}=\1"
+ALIASES += "clrv{1}=\1"
-ALIASES += "strg{1}=\1"
-ALIASES += "sglq{1}=\'\1\'"
-ALIASES += "dblq{1}=\"\1\""
+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=>"
+ALIASES += "prmt{1}=\1>"
+ALIASES += "sgst{1}=\1"
+ALIASES += "mtch{1}=\1"
+ALIASES += "smtc{1}=\1"
+ALIASES += "eror{1}=\1"
+ALIASES += "curs=_"
+ALIASES += "curs{1}=\1"
-ALIASES += "bold{1}=\1"
-ALIASES += "emph{1}=\1"
-ALIASES += "undr{1}=\1"
-ALIASES += "span{2}=\1"
-ALIASES += "spcl{2}=\1"
+ALIASES += "bold{1}=\1"
+ALIASES += "emph{1}=\1"
+ALIASES += "undr{1}=\1"
+ALIASES += "span{2}=\2"
+ALIASES += "spcl{2}=\2"
# 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"
diff --git a/Doxyfile.user b/Doxyfile.user
index 09683abd4..b1319a786 100644
--- a/Doxyfile.user
+++ b/Doxyfile.user
@@ -230,43 +230,48 @@ TAB_SIZE = 4
# Enhance Fish docs output from Doxygen. (See fish_lexicon_filter.in)
-ALIASES = "key{1}=\1"
-ALIASES += "key{2}=\1-\2"
-ALIASES += "key{3}=\1-\2"
-ALIASES += "cursor_key{2}=\1"
+ALIASES = "key{1}=\1"
+ALIASES += "key{2}=\1-\2"
+ALIASES += "key{3}=\1-\2"
+ALIASES += "cursor_key{2}=\1"
-ALIASES += "fish=\htmlonly[block] \n"
-ALIASES += "fish{1}=\htmlonly[block] \n"
-ALIASES += "endfish=
\endhtmlonly \n"
+ALIASES += "fish=\htmlonly[block] \n"
+ALIASES += "fish{1}=\htmlonly[block] \n"
+ALIASES += "endfish=
\endhtmlonly \n"
-ALIASES += "asis{1}=\1"
-ALIASES += "blah{1}=\1"
-ALIASES += "cmnd{1}=\1"
-ALIASES += "func{1}=\1"
-ALIASES += "sbin{1}=\1"
-ALIASES += "args{1}=\1"
-ALIASES += "opts{1}=\1"
-ALIASES += "vars{1}=\1"
-ALIASES += "optr{1}=\1"
-ALIASES += "redr{1}=\1"
-ALIASES += "fsfo{1}=\1"
-ALIASES += "path{1}=\1"
-ALIASES += "clrv{1}=\1"
+ALIASES += "asis{1}=\1"
+ALIASES += "outp{1}=\1"
+ALIASES += "blah{1}=#\1"
+ALIASES += "cmnd{1}=\1"
+ALIASES += "func{1}=\1"
+ALIASES += "sbin{1}=\1"
+ALIASES += "args{1}=\1"
+ALIASES += "opts{1}=\1"
+ALIASES += "vars{1}=\1"
+ALIASES += "optr{1}=\1"
+ALIASES += "redr{1}=\1"
+ALIASES += "fsfo{1}=\1"
+ALIASES += "path{1}=\1"
+ALIASES += "clrv{1}=\1"
-ALIASES += "strg{1}=\1"
-ALIASES += "sglq{1}='\1'"
-ALIASES += "dblq{1}=\"\1\""
+ALIASES += "strg{1}=\1"
+ALIASES += "sglq{1}='\1'"
+ALIASES += "dblq{1}=\"\1\""
-ALIASES += "prmt{1}="
-ALIASES += "sgst{1}="
-ALIASES += "eror{1}="
-ALIASES += "curs{1}="
+ALIASES += "prmt=>"
+ALIASES += "prmt{1}=\1>"
+ALIASES += "sgst{1}=\1"
+ALIASES += "mtch{1}=\1"
+ALIASES += "smtc{1}=\1"
+ALIASES += "eror{1}=\1"
+ALIASES += "curs= "
+ALIASES += "curs{1}=\1"
-ALIASES += "bold{1}=\1"
-ALIASES += "emph{1}=\1"
-ALIASES += "undr{1}=\1"
-ALIASES += "span{2}=\2"
-ALIASES += "spcl{2}=\2"
+ALIASES += "bold{1}=\1"
+ALIASES += "emph{1}=\1"
+ALIASES += "undr{1}=\1"
+ALIASES += "span{2}=\2"
+ALIASES += "spcl{2}=\2"
# 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"
diff --git a/Makefile.in b/Makefile.in
index cd1c57385..afcba3c91 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -259,8 +259,8 @@ prof: all
# The sed command deletes everything including and after the first -, for simpler version numbers
# Cleans up the user_doc/html directory once Doxygen is done.
-user_doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FILES) doc_src/fish_lexicon_filter
- (cat Doxyfile.user; echo INPUT_FILTER=doc_src/fish_lexicon_filter; \
+user_doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FILES) lexicon_filter
+ (cat Doxyfile.user; echo INPUT_FILTER=./lexicon_filter; \
echo PROJECT_NUMBER=$(FISH_BUILD_VERSION) | sed "s/-.*//") | doxygen - && touch user_doc; \
cd user_doc/html; rm -f bc_s.png bdwn.png closed.png ftv2*.png nav*.png open.png sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html
@@ -276,8 +276,8 @@ doc_src/user_doc.css: doc_src/user_doc.css.in doc_src/fish_lexicon_filter
# Source code documentation. Also includes user documentation.
#
-doc: *.h *.cpp doc.h Doxyfile
- (cat Doxyfile; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION)) | doxygen - ;
+doc: *.h *.cpp doc.h Doxyfile lexicon_filter
+ (cat Doxyfile; echo INPUT_FILTER=./lexicon_filter; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION)) | doxygen - ;
#
@@ -368,6 +368,7 @@ 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; \
mv lexicon.tmp lexicon.txt; rm -f lexicon_catalog.tmp lexicon_catalog.txt;
#
@@ -381,14 +382,19 @@ lexicon.txt: doc_src/commands.hdr $(FUNCTIONS_DIR_FILES) $(COMPLETIONS_DIR_FILES
# providing suitable CSS in user_doc.css.in
#
-doc_src/fish_lexicon_filter: lexicon.txt doc_src/fish_lexicon_filter.in
+lexicon_filter: lexicon.txt lexicon_filter.in
-rm $@.tmp $@
# Clean the filter input comments and set the shebang as sed can reside in
# /bin or /usr/bin and some versions dont allow more than one comment!.
- sed <$@.in >$@.tmp -e 's|@sed@|'"`command -v sed`"'|' -e '/^[ ]*#[^!]/d'
+ sed <$@.in >$@.tmp -e 's|@sed@|'"`which sed`"'|' -e '/^[ ]*#[^!]/d'
# Scan through the lexicon, transforming each line to something useful to Doxygen.
+ if `echo "x" | sed "/[[:<:]]x/d"`; then \
+ WORDBL='[[:<:]]'; WORDBR='[[:>:]]'; \
+ else\
+ WORDBL='\\<'; WORDBR='\\>'; \
+ fi; \
sed >$@.tmp -n \
- -e 's|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\)$$|s,[[:<:]]\2[[:>:]],@\1{\2},g|p' \
+ -e "s|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\)$$|s,$$WORDBL\2$$WORDBR,@\1{\2},g|p" \
-e '$$G;s/.*\n/b tidy/p'; \
mv $@.tmp $@; if test -x $@; then true; else chmod a+x $@; fi
@@ -493,11 +499,11 @@ common.o: $(COMMON_FILES)
# There ought to be something simpler.
#
-share/man: $(HELP_SRC) doc_src/fish_lexicon_filter
+share/man: $(HELP_SRC) lexicon_filter
-mkdir share/man
touch share/man
-rm -Rf share/man/man1
- PROJECT_NUMBER=`echo $(FISH_BUILD_VERSION)| sed "s/-.*//"` INPUT_FILTER=doc_src/fish_lexicon_filter \
+ PROJECT_NUMBER=`echo $(FISH_BUILD_VERSION)| sed "s/-.*//"` INPUT_FILTER=./lexicon_filter \
./build_tools/build_documentation.sh Doxyfile.help ./doc_src ./share
#
@@ -812,7 +818,7 @@ clean:
rm -f $(PROGRAMS) fish_tests key_reader
rm -f command_list.txt command_list_toc.txt toc.txt
rm -f doc_src/index.hdr doc_src/commands.hdr
- rm -f doc_src/fish_lexicon_filter lexicon.txt debug-lexicon.log
+ rm -f lexicon_filter lexicon.txt lexicon.log
rm -f FISH-BUILD-VERSION-FILE
if test "$(HAVE_DOXYGEN)" = 1; then \
rm -rf doc user_doc share/man; \
diff --git a/doc_src/alias.txt b/doc_src/alias.txt
index c1450cc44..079cabff2 100644
--- a/doc_src/alias.txt
+++ b/doc_src/alias.txt
@@ -23,11 +23,9 @@ The following code will create `rmi`, which runs `rm` with additional arguments
\fish
alias rmi "rm -i"
-\endfish
-This is equivalent to entering the following function:
+# This is equivalent to entering the following function:
-\fish
function rmi
rm -i $argv
end
diff --git a/doc_src/commands.hdr.in b/doc_src/commands.hdr.in
index 12269b2bd..fb9ebefa2 100644
--- a/doc_src/commands.hdr.in
+++ b/doc_src/commands.hdr.in
@@ -1,5 +1,5 @@
-/** \page commands Commands
-
+/**
+\page commands Commands
\htmlonly[block]