about summary refs log tree commit diff
path: root/Completion/User/_rcs
blob: d9280b11f0533e89c250f149878e89a801c80b81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#compdef co ci rcs

local nm=$compstate[nmatches] cmd="${words[1]:t}"

[[ $cmd = ci || $cmd = rcs ]] && _files

if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then
  local rep expl

  rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//))
  (( $#rep )) && _wanted files expl 'RCS file' compadd -a rep
fi