mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Various additions and fixes
This commit is contained in:
parent
668fa66d78
commit
c39fe3433b
21 changed files with 128 additions and 107 deletions
4
Doxyfile
4
Doxyfile
|
@ -242,9 +242,9 @@ ALIASES += "endfish=</pre>\n"
|
||||||
ALIASES += "asis{1}=\1"
|
ALIASES += "asis{1}=\1"
|
||||||
ALIASES += "outp{1}=\1"
|
ALIASES += "outp{1}=\1"
|
||||||
ALIASES += "blah{1}=#\1"
|
ALIASES += "blah{1}=#\1"
|
||||||
ALIASES += "cmnd{1}=\1"
|
ALIASES += "bltn{1}=\1"
|
||||||
ALIASES += "func{1}=\1"
|
ALIASES += "func{1}=\1"
|
||||||
ALIASES += "sbin{1}=\1"
|
ALIASES += "cmnd{1}=\1"
|
||||||
ALIASES += "args{1}=\1"
|
ALIASES += "args{1}=\1"
|
||||||
ALIASES += "opts{1}=\1"
|
ALIASES += "opts{1}=\1"
|
||||||
ALIASES += "vars{1}=\1"
|
ALIASES += "vars{1}=\1"
|
||||||
|
|
|
@ -242,9 +242,9 @@ ALIASES += "endfish=</pre>"
|
||||||
ALIASES += "asis{1}=\1"
|
ALIASES += "asis{1}=\1"
|
||||||
ALIASES += "outp{1}=\1"
|
ALIASES += "outp{1}=\1"
|
||||||
ALIASES += "blah{1}= \1"
|
ALIASES += "blah{1}= \1"
|
||||||
ALIASES += "cmnd{1}=<b>\1</b>"
|
ALIASES += "bltn{1}=<b>\1</b>"
|
||||||
ALIASES += "func{1}=<b>\1</b>"
|
ALIASES += "func{1}=<b>\1</b>"
|
||||||
ALIASES += "sbin{1}=<b>\1</b>"
|
ALIASES += "cmnd{1}=<b>\1</b>"
|
||||||
ALIASES += "args{1}=\1"
|
ALIASES += "args{1}=\1"
|
||||||
ALIASES += "opts{1}=\1"
|
ALIASES += "opts{1}=\1"
|
||||||
ALIASES += "vars{1}=\1"
|
ALIASES += "vars{1}=\1"
|
||||||
|
|
|
@ -242,9 +242,9 @@ ALIASES += "endfish=</pre>\endhtmlonly \n"
|
||||||
ALIASES += "asis{1}=\1"
|
ALIASES += "asis{1}=\1"
|
||||||
ALIASES += "outp{1}=<span class=\"output\">\1</span>"
|
ALIASES += "outp{1}=<span class=\"output\">\1</span>"
|
||||||
ALIASES += "blah{1}=<span class=\"comment\">#\1</span>"
|
ALIASES += "blah{1}=<span class=\"comment\">#\1</span>"
|
||||||
ALIASES += "cmnd{1}=<span class=\"command\">\1</span>"
|
ALIASES += "bltn{1}=<span class=\"command\">\1</span>"
|
||||||
ALIASES += "func{1}=<span class=\"function\">\1</span>"
|
ALIASES += "func{1}=<span class=\"function\">\1</span>"
|
||||||
ALIASES += "sbin{1}=<span class=\"binary\">\1</span>"
|
ALIASES += "cmnd{1}=<span class=\"binary\">\1</span>"
|
||||||
ALIASES += "args{1}=<span class=\"argument\">\1</span>"
|
ALIASES += "args{1}=<span class=\"argument\">\1</span>"
|
||||||
ALIASES += "opts{1}=<span class=\"argument\">\1</span>"
|
ALIASES += "opts{1}=<span class=\"argument\">\1</span>"
|
||||||
ALIASES += "vars{1}=<span class=\"variable\">\1</span>"
|
ALIASES += "vars{1}=<span class=\"variable\">\1</span>"
|
||||||
|
|
|
@ -357,11 +357,11 @@ lexicon.txt: doc_src/commands.hdr $(FUNCTIONS_DIR_FILES) $(COMPLETIONS_DIR_FILES
|
||||||
# Scan sources for commands/functions/binaries/colours. If GNU sed was portable, this could be much smarter.
|
# Scan sources for commands/functions/binaries/colours. If GNU sed was portable, this could be much smarter.
|
||||||
sed <command_list_toc.txt >>lexicon.tmp -n \
|
sed <command_list_toc.txt >>lexicon.tmp -n \
|
||||||
-e "s|^.*>\([a-z][a-z_]*\)</a>|'\1'|w lexicon_catalog.tmp" \
|
-e "s|^.*>\([a-z][a-z_]*\)</a>|'\1'|w lexicon_catalog.tmp" \
|
||||||
-e "s|'\(.*\)'|cmnd \1|p"; mv lexicon_catalog.tmp lexicon_catalog.txt; \
|
-e "s|'\(.*\)'|bltn \1|p"; mv lexicon_catalog.tmp lexicon_catalog.txt; \
|
||||||
printf "%s\n" $(COMPLETIONS_DIR_FILES) | sed -n \
|
printf "%s\n" $(COMPLETIONS_DIR_FILES) | sed -n \
|
||||||
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | fgrep -vx -f lexicon_catalog.txt | sed >>lexicon.tmp -n \
|
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | fgrep -vx -f lexicon_catalog.txt | sed >>lexicon.tmp -n \
|
||||||
-e 'w lexicon_catalog.tmp' \
|
-e 'w lexicon_catalog.tmp' \
|
||||||
-e "s|'\(.*\)'|sbin \1|p"; cat lexicon_catalog.tmp >> lexicon_catalog.txt; \
|
-e "s|'\(.*\)'|cmnd \1|p"; cat lexicon_catalog.tmp >> lexicon_catalog.txt; \
|
||||||
printf "%s\n" $(FUNCTIONS_DIR_FILES) | sed -n \
|
printf "%s\n" $(FUNCTIONS_DIR_FILES) | sed -n \
|
||||||
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | fgrep -vx -f lexicon_catalog.txt | sed >>lexicon.tmp -n \
|
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | fgrep -vx -f lexicon_catalog.txt | sed >>lexicon.tmp -n \
|
||||||
-e 'w lexicon_catalog.tmp' \
|
-e 'w lexicon_catalog.tmp' \
|
||||||
|
|
|
@ -102,4 +102,8 @@ Some useful Unicode/HTML5 entities:
|
||||||
|
|
||||||
### Lists
|
### Lists
|
||||||
|
|
||||||
|
### Synopsis rules
|
||||||
|
|
||||||
|
### Prompts and cursor
|
||||||
|
|
||||||
#### Author: Mark Griffiths [@GitHub](https://github.com/MarkGriffiths)
|
#### Author: Mark Griffiths [@GitHub](https://github.com/MarkGriffiths)
|
|
@ -14,6 +14,21 @@
|
||||||
\endhtmlonly
|
\endhtmlonly
|
||||||
`fish` ships with a large number of builtin commands, shellscript functions and external commands. These are all described below.
|
`fish` ships with a large number of builtin commands, shellscript functions and external commands. These are all described below.
|
||||||
|
|
||||||
|
Almost all fish commands respond to the `-h` or `--help` options to display their relevant help, also accessible using the `help` and `man` commands, like so:
|
||||||
|
|
||||||
|
\fish
|
||||||
|
echo -h
|
||||||
|
echo --help
|
||||||
|
# Prints help to the terminal window
|
||||||
|
|
||||||
|
man echo
|
||||||
|
# Displays the man page in the system pager
|
||||||
|
# (normally 'less', 'more' or 'most').
|
||||||
|
|
||||||
|
help echo
|
||||||
|
# Open a web browser to show the relevant documentation
|
||||||
|
\endfish
|
||||||
|
|
||||||
@command_list@
|
@command_list@
|
||||||
|
|
||||||
\htmlonly[block]
|
\htmlonly[block]
|
||||||
|
|
|
@ -12,7 +12,6 @@ contains [OPTIONS] KEY [VALUES...]
|
||||||
The following options are available:
|
The following options are available:
|
||||||
|
|
||||||
- `-i` or `--index` print the word index
|
- `-i` or `--index` print the word index
|
||||||
- `-h` or `--help` display this message
|
|
||||||
|
|
||||||
|
|
||||||
\subsection contains-example Example
|
\subsection contains-example Example
|
||||||
|
|
|
@ -9,7 +9,7 @@ count $VARIABLE
|
||||||
|
|
||||||
`count` prints the number of arguments that were passed to it. This is usually used to find out how many elements an environment variable array contains.
|
`count` prints the number of arguments that were passed to it. This is usually used to find out how many elements an environment variable array contains.
|
||||||
|
|
||||||
`count` does not accept any options, including '`-h`'.
|
`count` does not accept any options, including `-h` or `--help`.
|
||||||
|
|
||||||
`count` exits with a non-zero exit status if no arguments were passed to it, and with zero if at least one argument was passed.
|
`count` exits with a non-zero exit status if no arguments were passed to it, and with zero if at least one argument was passed.
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ The following options are available:
|
||||||
|
|
||||||
- `-e`, Enable interpretation of backslash escapes
|
- `-e`, Enable interpretation of backslash escapes
|
||||||
|
|
||||||
- `-h`, `--help` Display this help
|
|
||||||
|
|
||||||
\subsection echo-escapes Escape Sequences
|
\subsection echo-escapes Escape Sequences
|
||||||
|
|
||||||
If `-e` is used, the following sequences are recognized:
|
If `-e` is used, the following sequences are recognized:
|
||||||
|
|
|
@ -15,8 +15,6 @@ The following options are available:
|
||||||
|
|
||||||
- `-d` or `--debug-level=DEBUG_LEVEL` specify the verbosity level of fish. A higher number means higher verbosity. The default level is 1.
|
- `-d` or `--debug-level=DEBUG_LEVEL` specify the verbosity level of fish. A higher number means higher verbosity. The default level is 1.
|
||||||
|
|
||||||
- `-h` or `--help` display help and exit
|
|
||||||
|
|
||||||
- `-i` or `--interactive` specify that fish is to run in interactive mode
|
- `-i` or `--interactive` specify that fish is to run in interactive mode
|
||||||
|
|
||||||
- `-l` or `--login` specify that fish is to run as a login shell
|
- `-l` or `--login` specify that fish is to run as a login shell
|
||||||
|
|
|
@ -11,8 +11,6 @@ fish_indent [OPTIONS]
|
||||||
|
|
||||||
The following options are available:
|
The following options are available:
|
||||||
|
|
||||||
- `-h` or `--help` displays this help message and then exits
|
|
||||||
|
|
||||||
- `-i` or `--no-indent` do not indent commands
|
- `-i` or `--no-indent` do not indent commands
|
||||||
|
|
||||||
- `-v` or `--version` displays the current fish version and then exits
|
- `-v` or `--version` displays the current fish version and then exits
|
||||||
|
|
|
@ -22,8 +22,6 @@ The following options are available:
|
||||||
|
|
||||||
- `-e` or `--erase` causes the specified functions to be erased.
|
- `-e` or `--erase` causes the specified functions to be erased.
|
||||||
|
|
||||||
- `-h` or `--help` displays a help message and exits.
|
|
||||||
|
|
||||||
- `-n` or `--names` lists the names of all defined functions.
|
- `-n` or `--names` lists the names of all defined functions.
|
||||||
|
|
||||||
- `-q` or `--query` tests if the specified functions exist.
|
- `-q` or `--query` tests if the specified functions exist.
|
||||||
|
@ -42,9 +40,13 @@ The exit status of `functions` is the number of functions specified in the argum
|
||||||
|
|
||||||
|
|
||||||
\subsection functions-example Examples
|
\subsection functions-example Examples
|
||||||
|
\fish
|
||||||
|
functions -n
|
||||||
|
# Displays a list of currently-defined functions
|
||||||
|
|
||||||
`functions -n` displays a list of currently-defined functions.
|
functions -c foo bar
|
||||||
|
# Copies the 'foo' function to a new function called 'bar'
|
||||||
|
|
||||||
`functions -c foo bar` copies the `foo` function to a new function called `bar`.
|
functions -e bar
|
||||||
|
# Erases the function `bar`
|
||||||
`functions -e bar` erases the function `bar`.
|
\endfish
|
||||||
|
|
|
@ -1029,8 +1029,11 @@ When the cursor is over a parenthesis or a quote, `fish` also highlights its mat
|
||||||
|
|
||||||
To customize the syntax highlighting, you can set the environment variables `fish_color_normal`, `fish_color_command`, `fish_color_substitution`, `fish_color_redirection`, `fish_color_end`, `fish_color_error`, `fish_color_param`, `fish_color_comment`, `fish_color_match`, `fish_color_search_match`, `fish_color_cwd`, `fish_pager_color_prefix`, `fish_pager_color_completion`, `fish_pager_color_description`, `fish_pager_color_progress` and `fish_pager_color_secondary`. Usually, the value of these variables will be one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `white` or `normal`, but they can be an array containing any color options for the `set_color` command.
|
To customize the syntax highlighting, you can set the environment variables `fish_color_normal`, `fish_color_command`, `fish_color_substitution`, `fish_color_redirection`, `fish_color_end`, `fish_color_error`, `fish_color_param`, `fish_color_comment`, `fish_color_match`, `fish_color_search_match`, `fish_color_cwd`, `fish_pager_color_prefix`, `fish_pager_color_completion`, `fish_pager_color_description`, `fish_pager_color_progress` and `fish_pager_color_secondary`. Usually, the value of these variables will be one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `white` or `normal`, but they can be an array containing any color options for the `set_color` command.
|
||||||
|
|
||||||
Issuing `set fish_color_error black --background=red --bold` will make all commandline errors be written in a black, bold font, with a red background.
|
\fish
|
||||||
|
set fish_color_error black --background=red --bold
|
||||||
|
# Make all commandline errors be written in a black,
|
||||||
|
# bold font, with a red background.
|
||||||
|
\endfish
|
||||||
|
|
||||||
\subsection title Programmable title
|
\subsection title Programmable title
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,6 @@ jobs accepts the following switches:
|
||||||
|
|
||||||
- `-g` or `--group` only prints the group ID of each job.
|
- `-g` or `--group` only prints the group ID of each job.
|
||||||
|
|
||||||
- `-h` or `--help` displays a help message and exits.
|
|
||||||
|
|
||||||
- `-l` or `--last` prints only the last job to be started.
|
- `-l` or `--last` prints only the last job to be started.
|
||||||
|
|
||||||
- `-p` or `--pid` prints the process ID for each process in all jobs.
|
- `-p` or `--pid` prints the process ID for each process in all jobs.
|
||||||
|
|
|
@ -25,6 +25,4 @@ The following options are available:
|
||||||
|
|
||||||
- `-l`, `--launch` launches the default action for the specified files.
|
- `-l`, `--launch` launches the default action for the specified files.
|
||||||
|
|
||||||
- `-h`, `--help` displays a help message and exit.
|
|
||||||
|
|
||||||
- `-v`, `--version` displays the version number and exits.
|
- `-v`, `--version` displays the version number and exits.
|
||||||
|
|
|
@ -17,8 +17,6 @@ The following options are available:
|
||||||
|
|
||||||
- `-c`, `--print-colors` prints a list of all valid color names.
|
- `-c`, `--print-colors` prints a list of all valid color names.
|
||||||
|
|
||||||
- `-h`, `--help` displays a help message and exit.
|
|
||||||
|
|
||||||
- `-o`, `--bold` sets bold or extra bright mode.
|
- `-o`, `--bold` sets bold or extra bright mode.
|
||||||
|
|
||||||
- `-u`, `--underline` sets underlined mode.
|
- `-u`, `--underline` sets underlined mode.
|
||||||
|
|
|
@ -32,5 +32,3 @@ The following options are available:
|
||||||
- `-j CONTROLTYPE` or `--job-control=CONTROLTYPE` sets the job control type, which can be `none`, `full`, or `interactive`.
|
- `-j CONTROLTYPE` or `--job-control=CONTROLTYPE` sets the job control type, which can be `none`, `full`, or `interactive`.
|
||||||
|
|
||||||
- `-t` or `--print-stack-trace` prints a stack trace of all function calls on the call stack.
|
- `-t` or `--print-stack-trace` prints a stack trace of all function calls on the call stack.
|
||||||
|
|
||||||
- `-h` or `--help` displays a help message and exit.
|
|
||||||
|
|
|
@ -15,8 +15,6 @@ The following parameters are available:
|
||||||
|
|
||||||
- `SIGSPEC` is the name of the signal to trap.
|
- `SIGSPEC` is the name of the signal to trap.
|
||||||
|
|
||||||
- `-h` or `--help` displays help and exits.
|
|
||||||
|
|
||||||
- `-l` or `--list-signals` prints a list of signal names.
|
- `-l` or `--list-signals` prints a list of signal names.
|
||||||
|
|
||||||
- `-p` or `--print` prints all defined signal handlers.
|
- `-p` or `--print` prints all defined signal handlers.
|
||||||
|
|
|
@ -581,7 +581,7 @@ vim
|
||||||
|
|
||||||
\section tut-more Ready for more?
|
\section tut-more Ready for more?
|
||||||
|
|
||||||
If you want to learn more about fish, there is <a href="index.html">lots of detailed documentation</a>, an <a href="https://lists.sourceforge.net/lists/listinfo/fish-users">official mailing list</a>, the IRC channel \#fish on `irc.oftc.net`, and the <a href="http://github.com/fish-shell/fish-shell/">github page</a>.
|
If you want to learn more about fish, there is <a href="index.html">lots of detailed documentation</a>, an <a href="https://lists.sourceforge.net/lists/listinfo/fish-users">official mailing list</a>, the IRC channel \#fish on `irc.oftc.net`, and the <a href="https://github.com/fish-shell/fish-shell/">github page</a>.
|
||||||
|
|
||||||
\htmlonly[block]
|
\htmlonly[block]
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,8 +49,6 @@ The following additional options are also understood by `ulimit`:
|
||||||
|
|
||||||
- `-a` or `--all` prints all current limits
|
- `-a` or `--all` prints all current limits
|
||||||
|
|
||||||
- `-h` or `--help` displays help and exits.
|
|
||||||
|
|
||||||
The `fish` implementation of `ulimit` should behave identically to the implementation in bash, except for these differences:
|
The `fish` implementation of `ulimit` should behave identically to the implementation in bash, except for these differences:
|
||||||
|
|
||||||
- Fish `ulimit` supports GNU-style long options for all switches
|
- Fish `ulimit` supports GNU-style long options for all switches
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# ALIASES += "endfish=</pre>\endhtmlonly \n"
|
# ALIASES += "endfish=</pre>\endhtmlonly \n"
|
||||||
#.
|
#.
|
||||||
# ALIASES += "blah{1}=<span class=\"comment\">\1</span>"
|
# ALIASES += "blah{1}=<span class=\"comment\">\1</span>"
|
||||||
# ALIASES += "cmnd{1}=<span class=\"command\">\1</span>" and so on...
|
# ALIASES += "bltn{1}=<span class=\"command\">\1</span>" and so on...
|
||||||
#.
|
#.
|
||||||
# And simplify for man pages (Doxyfile.help)…
|
# And simplify for man pages (Doxyfile.help)…
|
||||||
# ALIASES = "fish=<pre>"
|
# ALIASES = "fish=<pre>"
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
# ALIASES += "endfish=</pre>"
|
# ALIASES += "endfish=</pre>"
|
||||||
#.
|
#.
|
||||||
# ALIASES += "blah{1}=\1"
|
# ALIASES += "blah{1}=\1"
|
||||||
# ALIASES += "cmnd{1}=<em>\1</em>"...
|
# ALIASES += "bltn{1}=<em>\1</em>"...
|
||||||
#.
|
#.
|
||||||
# It's meant to only ever be run once, during make, as Doxygen's 'INPUT
|
# It's meant to only ever be run once, during make, as Doxygen's 'INPUT
|
||||||
# FILTER', though can be run interactively by passing a file in via stdin. It
|
# FILTER', though can be run interactively by passing a file in via stdin. It
|
||||||
|
@ -301,17 +301,17 @@ s/^PreClean: //
|
||||||
}
|
}
|
||||||
/@vars/{
|
/@vars/{
|
||||||
:cleanvars
|
:cleanvars
|
||||||
s/\(vars{@optr{$}[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
|
s/\(vars{@optr{$}[^@}]*\)@bltn{\([^}]*\)}/\1\2/
|
||||||
s/\(vars{@optr{$}[^@}]*\)@func{\([^}]*\)}/\1\2/
|
s/\(vars{@optr{$}[^@}]*\)@func{\([^}]*\)}/\1\2/
|
||||||
s/\(vars{@optr{$}[^@}]*\)@sbin{\([^}]*\)}/\1\2/
|
s/\(vars{@optr{$}[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
|
||||||
s/\(vars{@optr{$}[^@}]*\)@args{\([^}]*\)}/\1\2/
|
s/\(vars{@optr{$}[^@}]*\)@args{\([^}]*\)}/\1\2/
|
||||||
t cleanvars
|
t cleanvars
|
||||||
}
|
}
|
||||||
/@redr/{
|
/@redr/{
|
||||||
:cleanredr
|
:cleanredr
|
||||||
s/\(redr{[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
|
s/\(redr{[^@}]*\)@bltn{\([^}]*\)}/\1\2/
|
||||||
s/\(redr{[^@}]*\)@func{\([^}]*\)}/\1\2/
|
s/\(redr{[^@}]*\)@func{\([^}]*\)}/\1\2/
|
||||||
s/\(redr{[^@}]*\)@sbin{\([^}]*\)}/\1\2/
|
s/\(redr{[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
|
||||||
s/\(redr{[^@}]*\)@fsfo{\([^}]*\)}/\1\2/
|
s/\(redr{[^@}]*\)@fsfo{\([^}]*\)}/\1\2/
|
||||||
s/\(redr{[^}]*\)}\( *\)@path{\([^}]*\)/\1\2\3/
|
s/\(redr{[^}]*\)}\( *\)@path{\([^}]*\)/\1\2\3/
|
||||||
t cleanredr
|
t cleanredr
|
||||||
|
@ -319,9 +319,9 @@ s/^PreClean: //
|
||||||
/@sgst/{
|
/@sgst/{
|
||||||
s/@sgst{<@/@sgst{@/
|
s/@sgst{<@/@sgst{@/
|
||||||
:cleansgst
|
:cleansgst
|
||||||
s/\(sgst{@curs{.}[^@]*\)@cmnd{\([^}]*\)}/\1\2/
|
s/\(sgst{@curs{.}[^@]*\)@bltn{\([^}]*\)}/\1\2/
|
||||||
s/\(sgst{@curs{.}[^@]*\)@func{\([^}]*\)}/\1\2/
|
s/\(sgst{@curs{.}[^@]*\)@func{\([^}]*\)}/\1\2/
|
||||||
s/\(sgst{@curs{.}[^@]*\)@sbin{\([^}]*\)}/\1\2/
|
s/\(sgst{@curs{.}[^@]*\)@cmnd{\([^}]*\)}/\1\2/
|
||||||
s/\(sgst{@curs{.}[^@]*\)@opts{\([^}]*\)}/\1\2/
|
s/\(sgst{@curs{.}[^@]*\)@opts{\([^}]*\)}/\1\2/
|
||||||
s/\(sgst{@curs{.}[^@]*\)@path{\([^}]*\)}/\1\2/
|
s/\(sgst{@curs{.}[^@]*\)@path{\([^}]*\)}/\1\2/
|
||||||
s/\(sgst{@curs{.}[^@]*\)@args{\([^}]*\)}/\1\2/
|
s/\(sgst{@curs{.}[^@]*\)@args{\([^}]*\)}/\1\2/
|
||||||
|
@ -330,9 +330,9 @@ s/^PreClean: //
|
||||||
}
|
}
|
||||||
/@fsfo/{
|
/@fsfo/{
|
||||||
:cleanfsfo
|
:cleanfsfo
|
||||||
s/\(fsfo{[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
|
s/\(fsfo{[^@}]*\)@bltn{\([^}]*\)}/\1\2/
|
||||||
s/\(fsfo{[^@}]*\)@func{\([^}]*\)}/\1\2/
|
s/\(fsfo{[^@}]*\)@func{\([^}]*\)}/\1\2/
|
||||||
s/\(fsfo{[^@}]*\)@sbin{\([^}]*\)}/\1\2/
|
s/\(fsfo{[^@}]*\)@cmnd{\([^}]*\)}/\1\2/
|
||||||
t cleanfsfo
|
t cleanfsfo
|
||||||
}
|
}
|
||||||
/@prmt{/{
|
/@prmt{/{
|
||||||
|
@ -372,92 +372,94 @@ x
|
||||||
s/^@prmt *//
|
s/^@prmt *//
|
||||||
}
|
}
|
||||||
#.
|
#.
|
||||||
|
# Special case for optional commands
|
||||||
|
s/@args{\[@bltn/@args{[@xbln/g
|
||||||
# Special case for one-line 'if' statements
|
# Special case for one-line 'if' statements
|
||||||
/@cmnd{if}/ {
|
/@bltn{if}/ {
|
||||||
s//@xcmd{if}/
|
s//@xbln{if}/
|
||||||
s/@cmnd{set}/@xcmd{set}/
|
s/@bltn{set}/@xbln{set}/
|
||||||
s/@cmnd{not}/@xcmd{not}/
|
s/@bltn{not}/@xbln{not}/
|
||||||
s/@cmnd{else}/@xcmd{else}/
|
s/@bltn{else}/@xbln{else}/
|
||||||
s/@cmnd{contains}/@xcmd{contains}/
|
s/@bltn{contains}/@xbln{contains}/
|
||||||
s/@cmnd{test}/@xcmd{test}/
|
s/@bltn{test}/@xbln{test}/
|
||||||
s/@cmnd{end}/@xcmd{end}/
|
s/@bltn{end}/@xbln{end}/
|
||||||
s/@sbin{grep}/@xbin{grep}/
|
s/@cmnd{grep}/@xcmd{grep}/
|
||||||
}
|
}
|
||||||
# one-line 'for' statements
|
# one-line 'for' statements
|
||||||
/@cmnd{for}/ {
|
/@bltn{for}/ {
|
||||||
s//@xcmd{for}/
|
s//@xbln{for}/
|
||||||
s/@args{in}/@xcmd{in}/
|
s/@args{in}/@xbln{in}/
|
||||||
}
|
}
|
||||||
# one-line 'begin' statements
|
# one-line 'begin' statements
|
||||||
/@cmnd{begin}/ {
|
/@bltn{begin}/ {
|
||||||
s//@xcmd{begin}/
|
s//@xbln{begin}/
|
||||||
s/@cmnd{end}/@xcmd{end}/
|
s/@bltn{end}/@xbln{end}/
|
||||||
}
|
}
|
||||||
# one-line 'break' statements
|
# one-line 'break' statements
|
||||||
/@cmnd{break}/ {
|
/@bltn{break}/ {
|
||||||
s//@xcmd{break}/
|
s//@xbln{break}/
|
||||||
s/@cmnd{end}/@xcmd{end}/
|
s/@bltn{end}/@xbln{end}/
|
||||||
}
|
}
|
||||||
# one-line 'continue' statements
|
# one-line 'continue' statements
|
||||||
/@cmnd{continue}/ {
|
/@bltn{continue}/ {
|
||||||
s//@xcmd{continue}/
|
s//@xbln{continue}/
|
||||||
s/@cmnd{end}/@xcmd{end}/
|
s/@bltn{end}/@xbln{end}/
|
||||||
}
|
}
|
||||||
# one-line 'switch' statements
|
# one-line 'switch' statements
|
||||||
/@cmnd{switch}/ {
|
/@bltn{switch}/ {
|
||||||
s//@xcmd{switch}/
|
s//@xbln{switch}/
|
||||||
s/@cmnd{case}/@xcmd{case}/
|
s/@bltn{case}/@xbln{case}/
|
||||||
s/@cmnd{end}/@xcmd{end}/
|
s/@bltn{end}/@xbln{end}/
|
||||||
}
|
}
|
||||||
# one-line 'function' statements
|
# one-line 'function' statements
|
||||||
/@cmnd{function}/ {
|
/@bltn{function}/ {
|
||||||
s//@xcmd{function}/
|
s//@xbln{function}/
|
||||||
s/@cmnd{return}/@xcmd{return}/
|
s/@bltn{return}/@xbln{return}/
|
||||||
s/@cmnd{end}/@xcmd{end}/
|
s/@bltn{end}/@xbln{end}/
|
||||||
}
|
}
|
||||||
# one-line 'bind' statements - special input functions
|
# one-line 'bind' statements - special input functions
|
||||||
/@cmnd{bind}/ {
|
/@bltn{bind}/ {
|
||||||
s//@xcmd{bind}/
|
s//@xbln{bind}/
|
||||||
s/@....{\([a-z]*\)}\(-[a-z-]*\)/@args{\1\2}/
|
s/@....{\([a-z]*\)}\(-[a-z-]*\)/@args{\1\2}/
|
||||||
}
|
}
|
||||||
# one-line 'builtin' statements
|
# one-line 'builtin' statements
|
||||||
s/@cmnd{builtin} @cmnd/@xcmd{builtin} @xcmd/g
|
s/@bltn{builtin} @bltn/@xbln{builtin} @xbln/g
|
||||||
s/@cmnd{builtin} @sbin/@xcmd{builtin} @xbin/g
|
s/@bltn{builtin} @cmnd/@xbln{builtin} @xcmd/g
|
||||||
s/@cmnd{builtin} @func/@xcmd{builtin} @xfnc/g
|
s/@bltn{builtin} @func/@xbln{builtin} @xfnc/g
|
||||||
#.
|
#.
|
||||||
# one-line 'command' statements
|
# one-line 'command' statements
|
||||||
s/@cmnd{command} @cmnd/@xcmd{command} @xcmd/g
|
s/@bltn{command} @bltn/@xbln{command} @xbln/g
|
||||||
s/@cmnd{command} @sbin/@xcmd{command} @xbin/g
|
s/@bltn{command} @cmnd/@xbln{command} @xcmd/g
|
||||||
s/@cmnd{command} @func/@xcmd{command} @xfnc/g
|
s/@bltn{command} @func/@xbln{command} @xfnc/g
|
||||||
#.
|
#.
|
||||||
# one-line 'and/or' statements
|
# one-line 'and/or' statements
|
||||||
s/@cmnd{and} @cmnd/@xcmd{and} @xcmd/g
|
s/@bltn{and} @bltn/@xbln{and} @xbln/g
|
||||||
s/@cmnd{and} @sbin/@xcmd{and} @xbin/g
|
s/@bltn{and} @cmnd/@xbln{and} @xcmd/g
|
||||||
s/@cmnd{and} @func/@xcmd{and} @xfnc/g
|
s/@bltn{and} @func/@xbln{and} @xfnc/g
|
||||||
s/@cmnd{or} @cmnd/@xcmd{or} @xcmd/g
|
s/@bltn{or} @bltn/@xbln{or} @xbln/g
|
||||||
s/@cmnd{or} @sbin/@xcmd{or} @xbin/g
|
s/@bltn{or} @cmnd/@xbln{or} @xcmd/g
|
||||||
s/@cmnd{or} @func/@xcmd{or} @xfnc/g
|
s/@bltn{or} @func/@xbln{or} @xfnc/g
|
||||||
#.
|
#.
|
||||||
s/^\( *\)@sbin/\1@xbin/
|
|
||||||
s/\( *[;()] *\)@sbin/\1@xbin/g
|
|
||||||
s/\( *@redr{|} *\)@sbin/\1@xbin/g
|
|
||||||
s/^\( *\)@cmnd/\1@xcmd/
|
s/^\( *\)@cmnd/\1@xcmd/
|
||||||
s/\( *[;()] *\)@cmnd/\1@xcmd/g
|
s/\( *[;()] *\)@cmnd/\1@xcmd/g
|
||||||
s/\( *@redr{|} *\)@cmnd/\1@xcmd/g
|
s/\( *@redr{|} *\)@cmnd/\1@xcmd/g
|
||||||
|
s/^\( *\)@bltn/\1@xbln/
|
||||||
|
s/\( *[;()] *\)@bltn/\1@xbln/g
|
||||||
|
s/\( *@redr{|} *\)@bltn/\1@xbln/g
|
||||||
s/^\( *\)@func/\1@xfnc/
|
s/^\( *\)@func/\1@xfnc/
|
||||||
s/\( *[;()] *\)@func/\1@xfnc/g
|
s/\( *[;()] *\)@func/\1@xfnc/g
|
||||||
s/\( *@redr{|} *\)@func/\1@xfnc/g
|
s/\( *@redr{|} *\)@func/\1@xfnc/g
|
||||||
s/\\@cmnd{\([^}]*\)/@args{@bksl{\1}/g
|
s/\\@bltn{\([^}]*\)/@args{@bksl{\1}/g
|
||||||
s/@cmnd/@args/g
|
s/@bltn/@args/g
|
||||||
s/@func/@args/g
|
s/@func/@args/g
|
||||||
s/@sbin/@args/g
|
s/@cmnd/@args/g
|
||||||
#.
|
#.
|
||||||
s/^.*$/PostArgs: &/w lexicon.log
|
s/^.*$/PostArgs: &/w lexicon.log
|
||||||
s/^PostArgs: //
|
s/^PostArgs: //
|
||||||
#.
|
#.
|
||||||
s/xcmd/cmnd/g
|
s/xbln/bltn/g
|
||||||
s/xfnc/func/g
|
s/xfnc/func/g
|
||||||
s/xbin/sbin/g
|
s/xcmd/cmnd/g
|
||||||
x
|
x
|
||||||
/^@prmt/ {
|
/^@prmt/ {
|
||||||
G
|
G
|
||||||
|
@ -473,9 +475,23 @@ x
|
||||||
s/</\</g
|
s/</\</g
|
||||||
s/>/\>/g
|
s/>/\>/g
|
||||||
s/((d))/@/g
|
s/((d))/@/g
|
||||||
|
#.
|
||||||
|
# Final post processing
|
||||||
|
s/};\([^]]\)/}@redr{;}\1/g
|
||||||
|
s/};$/}@redr{;}/
|
||||||
|
s/ \[\([@(]\)/ @args{[}\1/g
|
||||||
|
s/ \[\([A-Z]*\) / @args{[\1} /g
|
||||||
|
s/@args{\([a-zA-Z0-9_.]*\)}\]/@args{\1]}/g
|
||||||
|
s/@args{\([a-zA-Z0-9_.]*\)}: /@args{\1:} /g
|
||||||
|
s/@bltn{echo} @fsfo/@bltn{echo} @args/g
|
||||||
|
s/@bltn{echo}\([a-zA-Z0-9.@{} _-]*\)@fsfo/@bltn{echo}\1@args/g
|
||||||
|
s/ \] / @args{]} /g
|
||||||
|
s/ \]$/ @args{]}/g
|
||||||
|
s/\]}\]$/]]}/
|
||||||
s/\\\([()]\)/@optr{@bksl{\1}}/g
|
s/\\\([()]\)/@optr{@bksl{\1}}/g
|
||||||
s/\([()]\)/@optr{\1}/g
|
s/\([()]\)/@optr{\1}/g
|
||||||
s/\\n/@bksl{n}/
|
s/\\n/@bksl{n}/
|
||||||
|
s/ \\$//
|
||||||
#.
|
#.
|
||||||
# Uncomment the folowing two lines (ss) to log the final output, sent to Doxygen.
|
# Uncomment the folowing two lines (ss) to log the final output, sent to Doxygen.
|
||||||
s/^.*$/Output : &\
|
s/^.*$/Output : &\
|
||||||
|
@ -562,25 +578,25 @@ s/\(@path{[^}]*\)}@fsfo/\1}@fsfo/
|
||||||
#.
|
#.
|
||||||
#### This section is built in the Makefile. Just some formatting examples. #####
|
#### This section is built in the Makefile. Just some formatting examples. #####
|
||||||
#.
|
#.
|
||||||
# fish commands (cmnd) <- 4 character code that has a Doxygen alias counterpart
|
# Fish builtin (bltn) <- 4 character code that has a Doxygen alias counterpart
|
||||||
# template : s/[[:<:]]function[[:>:]]/@cmnd{&}/
|
# template : s/[[:<:]]function[[:>:]]/@bltn{&}/
|
||||||
#.
|
#.
|
||||||
# s,[[:<:]]function[[:>:]],@cmnd{function},g
|
# s,[[:<:]]function[[:>:]],@bltn{function},g
|
||||||
# s,[[:<:]]begin[[:>:]],@cmnd{begin},g
|
# s,[[:<:]]begin[[:>:]],@bltn{begin},g
|
||||||
# ...
|
# ...
|
||||||
#.
|
#.
|
||||||
# fish functions (func)
|
# Fish functions (func)
|
||||||
# Populated by 'public' functions' filename.
|
# Populated by 'public' functions' filename.
|
||||||
#.
|
#.
|
||||||
# s,[[:<:]]fish_pwd[[:>:]],@func{fish_pwd},g
|
# s,[[:<:]]fish_pwd[[:>:]],@func{fish_pwd},g
|
||||||
# s,[[:<:]]fish_prompt[[:>:]],@func{fish_prompt},g
|
# s,[[:<:]]fish_prompt[[:>:]],@func{fish_prompt},g
|
||||||
# ...
|
# ...
|
||||||
#.
|
#.
|
||||||
# Shell Binary (sbin)
|
# Shell Command (cmnd)
|
||||||
# Populated from completion filenames
|
# Populated from completion filenames
|
||||||
#.
|
#.
|
||||||
# s,[[:<:]]seq[[:>:]],@sbin{seq},g
|
# s,[[:<:]]seq[[:>:]],@cmnd{seq},g
|
||||||
# s,[[:<:]]rm[[:>:]],@sbin{rm},g
|
# s,[[:<:]]rm[[:>:]],@cmnd{rm},g
|
||||||
# ...
|
# ...
|
||||||
#.
|
#.
|
||||||
# Color Variable (clrv)
|
# Color Variable (clrv)
|
||||||
|
|
Loading…
Reference in a new issue