#compdef co ci rcs local nm=$compstate[nmatches] [[ $words[1] = ci || $words[1] = rcs ]] && _files if [[ $compstate[nmatches] -eq nm && -d RCS && $words[1] != ci ]]; then local rep rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//)) (( $#rep )) && compadd - $rep fi