#compdef co ci rcs local nm=$compstate[nmatches] cmd="${words[1]:t}" ret=1 if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then local rep expl rep=(RCS/*,v(:t:s/\,v//)) (( $#rep )) && _wanted files expl 'RCS file' compadd -a rep && ret=0 fi [[ $cmd = ci || $cmd = rcs || ret -eq 1 ]] && _files && ret=0 return ret