fish-shell/doc_src/contains.txt
axel 885d16fcd6 Fix casing and other minor issues in documentation
darcs-hash:20061031152316-ac50b-e68db9853d6e9461a0c054f1ea290704ccfc0a31.gz
2006-11-01 01:23:16 +10:00

23 lines
573 B
Text

\section contains contains - test if a word is present in a list
\subsection contains-synopsis Synopsis
<code>contains [OPTIONS] KEY [VALUES...]</code>
\subsection contains-description Description
- \c -h or \c --help display this message
Test if the set VALUES contains the string KEY. Return status is 0 if
yes, 1 otherwise
\subsection contains-example Example
<pre>
for i in ~/bin /usr/local/bin
if not contains \$i \$PATH
set PATH \$PATH i
end
end
</pre>
The above code tests if ~/bin and /usr/local/bin are in the path and if they are not, they are added.