mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
1287b9d823
Large list of changes, including formatting and typos for most commands. More substantive changes have been made to alias, bind, block, break, builtin, case, cd, commandline, count, else, emit, fish_config, funced, function, functions, history, math, mimedb, nextd, not, popd, prevd, pushd, pwd, random, read, set, set_color, switch, test, trap, type, ulimit, umask, and while.
29 lines
760 B
Text
29 lines
760 B
Text
\section count count - count the number of elements of an array
|
|
|
|
\subsection count-synopsis Synopsis
|
|
<tt>count $VARIABLE</tt>
|
|
|
|
\subsection count-description Description
|
|
|
|
<tt>count</tt> 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.
|
|
|
|
\c count does not accept any options, including '-h'.
|
|
|
|
\c 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.
|
|
|
|
\subsection count-example Example
|
|
|
|
<pre>
|
|
count $PATH
|
|
</pre>
|
|
|
|
returns the number of directories in the users PATH variable.
|
|
|
|
<pre>
|
|
count *.txt
|
|
</pre>
|
|
|
|
returns the number of files in the current working directory ending with the suffix '.txt'.
|