1#compdef global 2 3local cmds="(-c --completion -f --file -g --grep -I --idutils -p --print-dbpath -P --path -u --update --version --help)" 4 5_arguments \ 6 "$cmds"{-c,--completion}'[completion on prefix]:prefix:' \ 7 "$cmds"{-f,--file}'[print function definitions in file]' \ 8 "$cmds"{-g,--grep}'[print all lines which match pattern using grep]:pattern' \ 9 "$cmds"{-I,--idutils}'[print all lines which match pattern using id-utils]:pattern' \ 10 "$cmds"{-p,--print-dbpath}'[print location of GTAGS]' \ 11 "$cmds"{-P,--path}'[print paths matching pattern]:pattern:' \ 12 "$cmds"{-u,--update}'[locate tag files and update incrementally]' \ 13 '(-a --absolute)'{-a,--absolute}'[print absolute path names]' \ 14 '(-e --regexp :)'{-e,--regexp}'[specify pattern]:pattern:_global_tags' \ 15 '(-G --basic-regexp :)'{-G,--basic-regexp}'[specify basic regexp to use]:word:_global_tags' \ 16 '(-i --ignore-case)'{-i,--ignore-case}'[ignore case in patterns]' \ 17 '(-l --local)'{-l,--local}'[print just objects which exist under the current directory]' \ 18 '(-n --nofilter)'{-n,--nofilter}'[suppress sort filter and path conversion filter]' \ 19 '(-o --other)'{-o,--other}'[search in other files, not just source files (with -g)]' \ 20 '(-q --quiet)'{-q,--quiet}'[quiet mode]' \ 21 '(-r --reference --rootdir)'{-r,--reference,--rootdir}'[find object references instead of definitions]' \ 22 '(-s --symbol)'{-s,--symbol}'[find symbols instead of function names]:pattern' \ 23 '(-t --tags)'{-t,--tags}'[output in standard ctags format]' \ 24 '(-T --through -s -r -l)'{-T,--through}'[search through all tag files in GTAGSLIBPATH]' \ 25 '(-v --verbose)'{-v,--verbose}'[verbose mode]' \ 26 '(-x --cxref)'{-x,--cxref}'[additionally list line number and contents]' \ 27 '(- :)--version[display version information]' \ 28 '(- :)--help[display help information]' \ 29 ':word:_global_tags' 30