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