diff options
author | Clint Adams <clint@users.sourceforge.net> | 2002-07-22 21:31:44 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2002-07-22 21:31:44 +0000 |
commit | f45395457bb54b8f60b627ab0a807e9e7d1729d4 (patch) | |
tree | 872fcdee511cf06e3f6a0f0fc419a5e6ed1c2063 | |
parent | adfd1627098816ef87187078e558687618e16ff9 (diff) | |
download | zsh-f45395457bb54b8f60b627ab0a807e9e7d1729d4.tar.gz zsh-f45395457bb54b8f60b627ab0a807e9e7d1729d4.tar.xz zsh-f45395457bb54b8f60b627ab0a807e9e7d1729d4.zip |
17476: Matt Zimmerman's completion for GNU GLOBAL.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Completion/Unix/Command/.distfiles | 1 | ||||
-rw-r--r-- | Completion/Unix/Command/_global | 45 | ||||
-rw-r--r-- | Completion/Unix/Command/_global_tags | 9 |
4 files changed, 62 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 8f1bea054..a31f08904 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-07-22 Clint Adams <clint@zsh.org> + + * 17476: Completion/Unix/Command/.distfiles, + Completion/Unix/Command/_global, + Completion/Unix/Command/_global_tags: Matt Zimmerman's + completion for GNU GLOBAL. + 2002-07-16 Tanaka Akira <akr@zsh.org> * 17459: Completion/Unix/Command/_cvs: exclude file which have diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index bdcc4971c..33e1023e3 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -18,4 +18,5 @@ _last _loadkeys _modutils _ruby _sysctl _links _samba _user_admin _rsync _arping _spamassassin _mtools _ifconfig _fsh _chkconfig _cdcd _irssi _mysqldiff _sccs _netcat _larch _valgrind _texinfo _figlet +_global _global_tags ' diff --git a/Completion/Unix/Command/_global b/Completion/Unix/Command/_global new file mode 100644 index 000000000..1c3bb6f41 --- /dev/null +++ b/Completion/Unix/Command/_global @@ -0,0 +1,45 @@ +#compdef global + +_arguments \ + '(--completion)-c[completion on prefix]:prefix:' \ + '(-c)--completion:prefix:' \ + '(--file)-f[print function definitions in file]' \ + '(-f)--file' \ + '(--grep)-g[print all lines which match pattern using grep]:pattern' \ + '(-g)--grep' \ + '(--idutils)-I[print all lines which match pattern using id-utils]:pattern' \ + '(-I)--idutils' \ + '(--print-dbpath)-p[print location of GTAGS]' \ + '(-p)--print-dbpath' \ + '(--path)-P[print paths matching pattern]:pattern:' \ + '(-P)--path' \ + '(--update)-u[locate tag files and update incrementally]' \ + '(-u)--update' \ + '(--absolute)-a[Print absolute path names]' \ + '(-a)--absolute' \ + '(--ignore-case)-i[ignore case in patterns]' \ + '(-i)--ignore-case' \ + '(--local)-l[Print just objects which exist under the current directory]' \ + '(-l)--local' \ + '(--nofilter)-n[Suppress sort filter and path conversion filter]' \ + '(-n)--nofilter' \ + '(--other)-o[Search in other files, not just source files (with -g)]' \ + '(-o)--other' \ + '(--quiet)-q[Quiet mode]' \ + '(-q)--quiet' \ + '(--reference --rootdir)-r[Find object references instead of definitions]' \ + '(-r --rootdir)--rereference' \ + '(-r --reference)--rootdir' \ + '(--symbol)-s[Find symbols instead of function names]:pattern:' \ + '(-s)--symbol' \ + '(--tags)-t[Output in standard ctags format]' \ + '(-t)--tags' \ + '(--through -s -r -l)-T[Search through all tag files in GTAGSLIBPATH]' \ + '(-T -s -r -l)--through' \ + '(--verbose)-v[Verbose mode]' \ + '(-v)--verbose' \ + '(--cxref)-x[In addition to default output, list line number and contents]' \ + '(-x)--cxref' \ + '--version:show version number:' \ + '--help:show help:' \ + ':word:_global_tags' diff --git a/Completion/Unix/Command/_global_tags b/Completion/Unix/Command/_global_tags new file mode 100644 index 000000000..bdd01baf6 --- /dev/null +++ b/Completion/Unix/Command/_global_tags @@ -0,0 +1,9 @@ +#autoload + +local globalresults + +[[ -z $words[CURRENT] ]] && return 1 + +globalresults=($(global --completion $words[CURRENT])) + +compadd -M 'm:{a-zA-Z}={A-Za-z}' -a "$@" - globalresults |