contains(1)

NAME
contains - test if a word is present in a list

  Synopsis
contains [OPTIONS] KEY [VALUES...]

  Description
contains tests whether the set VALUES contains the string KEY. If so, contains exits with status 0; if not, it exits with status 1.

The following options are available:

•   -i or --index print the word index

•   -h or --help display this message

  Example

for i in ~/bin /usr/local/bin
	if not contains $i $PATH
		set PATH $PATH $i
	end
end

The above code tests if ~/bin and /usr/local/bin are in the path and adds them if not.