Something
public text v1 · immutablefunction foo () {
src=""
if [[ -z $1 ]]; then
print Search: You must enter the name of the file to search for.
elif [ $3 ]; then
print Search: Too many arguments supplied.
elif [[ -z $2 ]]; then
src=$PWD
file=$1
else
src=$1
file=$2
fi
if [[ $src != "" ]]; then
print Search: Searching for $file in $src ...
file="'*$file*'"
find $src -iname $file
fi
}