about summary refs log tree commit diff
path: root/Completion/User/_rcs
blob: 272e546818fc3e7b0329ff20b8a9e4b67faef87b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#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 expl

  rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//))
  _description expl 'RCS file'
  (( $#rep )) && compadd "$expl[@]" - $rep
fi