summary refs log tree commit diff
path: root/Completion/Unix/Command/_sccs
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-03-12 18:55:12 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-03-12 18:55:12 +0000
commit01e67ec323e5466204970a637f81e4d4427da396 (patch)
treee584bb6e3b8b8473fda4b783fe9745901e0ec44a /Completion/Unix/Command/_sccs
parent9ba4f4af9c73f296d32a64c7458542f02f701c41 (diff)
downloadzsh-01e67ec323e5466204970a637f81e4d4427da396.tar.gz
zsh-01e67ec323e5466204970a637f81e4d4427da396.tar.xz
zsh-01e67ec323e5466204970a637f81e4d4427da396.zip
fix completions of locales on Linux, complete for more commands using
existing completions and more improvements to sccs completion
Diffstat (limited to 'Completion/Unix/Command/_sccs')
-rw-r--r--Completion/Unix/Command/_sccs44
1 files changed, 36 insertions, 8 deletions
diff --git a/Completion/Unix/Command/_sccs b/Completion/Unix/Command/_sccs
index ed0dd516d..2591ceb16 100644
--- a/Completion/Unix/Command/_sccs
+++ b/Completion/Unix/Command/_sccs
@@ -6,7 +6,7 @@ _sccs_files() {
   dir="${(M)PREFIX##*/}$finalpath"
   [[ $~dir = (.|..|)/* ]] || dir="${PROJECTDIR:-~+}/$dir"
   compset -P "*/"
-  _wanted file expl file compadd "$@" - $~dir/*(N.:t:s/s.//) && ret=0
+  _wanted file expl file compadd "$@" - $~dir/s.*(N.:t:s/s.//) && ret=0
   PREFIX="$pref"
   IPREFIX="$ipref"
   _wanted sccs-files expl 'sccs file' _files -W ${PROJECTDIR:-~+} \
@@ -20,9 +20,31 @@ typeset -A opt_args
 local subcmds ropt copt sfiles finalpath
 
 subcmds=(
-  admin cdc check clean comb create deledit delget delta diffs edit
-  enter fix get help info print prs ptr rmdel sact sccsdiff tell
-  unedit unget val what
+  'admin:modify the flags or checksum of an sccs history file'
+  'cdc:annotate the commentary of an sccs delta'
+  'check:check for files currently being edited'
+  'clean:remove files that can be retrieved from sccs history'
+  'comb:generate scripts to combine deltas'
+  'create:create (initialize) history files'
+  'deledit:check file in and straight out again'
+  'delget:check file in and maintain read-only copy'
+  'delta:check in changes'
+  'diffs:compare working copy with version in sccs history'
+  'edit:retrieve file for editing (check out)'
+  "enter:like create, but omits the final 'sccs get'"
+  'fix:revise a (leaf) delta'
+  'get:retieve a version from the sccs history'
+  'help:get information on sccs commands and error messages'
+  {info,tell}':list files being edited'
+  'print:print history of specified files'
+  'prs:display delta table for an sccs file'
+  'prt:display the delta table, but omit the MR field'
+  'rmdel:remove specfied delta from history file'
+  'sact:show editing activity status of an sccs file'
+  'sccsdiff:compare two versions from sccs history'
+  {unedit,unget}':undo check out'
+  'val:validate history file'
+  'what:display any ID keyword strings in a file'
 )
 
 ropt='-r+[specify sccs delta id]:sccs delta id'
@@ -37,7 +59,7 @@ if [[ $service = sccs ]]; then
     '*::command:->subcmd' && return 0
 
   if (( CURRENT == 1 )); then
-    _wanted commands expl 'sccs command' compadd -a subcmds
+    _describe -t commands 'sccs command' subcmds
     return
   fi
   service="$words[1]"
@@ -102,9 +124,10 @@ case $service in
   ;;
   fix) _arguments "$ropt" "$sfiles";;
   help)
-    _alternative \
-      "commands:sccs command:(${(j: :)subcmds})" \
-      'message-codes:sccs message code:' 
+    [[ $PREFIX$SUFFIX = [0-9]# ]] &&
+        _message -e message-codes "sccs message code"
+    subcmds+=( "stuck:help on help" )
+    _describe -t commands 'sccs command' subcmds
   ;;
   prs)
     _arguments "$sfiles" "$ropt" "$copt" \
@@ -128,6 +151,11 @@ case $service in
     ;;
   rmdel) _arguments "$ropt" "$sfiles";;
   sccsdiff) _diff_options diff "$ropt" "$sfiles";;
+  unedit|unget)
+    _arguments "$sfiles" "$ropt" \
+      '-s[silent]' \
+      '-n[retain the retrieved version]'
+    ;;
   val)
     _arguments "$sfiles" "$ropt" \
       '-s[silent]' \