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

local cmd="${words[1]:t}" ret=1

if [[ -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