From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 986 invoked from network); 7 Mar 2021 19:19:03 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Mar 2021 19:19:03 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1615144743; b=CZvHAb7uEAaKzskyQ7NHQ0PVb7tJn+9GYfCb259FLFrfG12rtklfIACtpdOsWc5F1R9ws2ghT2 2LRz3BtLiotU8jW/7V0vnDDJ72zC9Yml7Mb+icgVf9ARP8T45O5ANo5YpRzfzEraUoV3I+3348 m1e2wOmedg13PyxPUMzqrkLa1QnIEQ7MUr08evAVys160XoIS7lF5tHssEktvIfkokELOohup/ 4WP3YoamAR8ygzy872uHjJQ3gr3VMbnh7hBLzjLP8WWRl7uyry8OKMapM7YWdQnmY8xE+Rv/5c vJFBdwMhdN/2k8C15W1HRXJ5UOs10mTAqBXGF0kG6YfskQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f51.google.com) smtp.remote-ip=209.85.210.51; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1615144743; bh=JcsaBHuGF8rt9KS0ZGOF69FZHeVwC/03dGLEtZLsrPs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:References:To:Cc:In-Reply-To:Date:Subject:MIME-Version: Content-Type:Message-ID:From:DKIM-Signature:DKIM-Signature; b=yAVirAAFtOJv7tsj2NRAz0pu168KKyY1z0Ps4wj3W+FbyQNsOInhnkBY8Hm111ON2q76pNWvJI sap4aZMmBm2HiJQuw4en/85378qFlKYyXbFZs6dgP4c150ipjwbKjzhGFVsLFlxiLA+6oVspKa lYR3YiYMJJWXz7/o19VFRgJIHcPh1ysqVPyBGK1Ljj5FFmJWSxpZ62AMCeb9w+cMzljYhoeM7H 499ptWdzYP/XTjQYb+6FENNyfoPYQ7TYCVcqlLa3+yeE//7WFXqG77E/d5z9xGaeZyKKRM6PLT 9HACo+qYcaoix4wV0ISzt4zBSbGMEPFWCrBMT4aqqpFgfw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:References:To:Cc:In-Reply-To:Date: Subject:Mime-Version:Content-Type:Message-Id:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=TMXuEoHk2L7TE8gnfn8LLUzs0V/OreSOjrbkfArw4GY=; b=NM+ys1epfZKNsU0bvGCwSvbsEj IZw9qDKgEyhvwuRnUh/6GwqKHYynCuWSYdbVHVz0ra2u/sjeEmPVSJkzBElC2iF6F43M9uHCUcHtK fhqMknylUYnNIvshNjuGFXIopHrCbv3YXHkCy6KPHQQhJmEW9GORl7lgM4NmwtbXlULQhX92aaNBL jZ5Pm4u95GR4IFfwmpkX/0SlkZs+38Myq0R+gr70c5bhlvbf+hhtw1ysvA39fQKiFfRcHI1tbnjKN wRjGxcCELNqfW9PuEtdPI5Z0q2RtW6gUZKUoELTs0qB5Q6L9fRhbiUfbtNBcHLUXV8uoQ+ndcmcWv KiymGwEg==; Received: from authenticated user by zero.zsh.org with local id 1lIyve-000MWF-S0; Sun, 07 Mar 2021 19:19:03 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f51.google.com) smtp.remote-ip=209.85.210.51; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ot1-f51.google.com ([209.85.210.51]:34496) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lIyvK-000MNj-9x; Sun, 07 Mar 2021 19:18:43 +0000 Received: by mail-ot1-f51.google.com with SMTP id n23so1514052otq.1 for ; Sun, 07 Mar 2021 11:18:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=TMXuEoHk2L7TE8gnfn8LLUzs0V/OreSOjrbkfArw4GY=; b=LH0GXQU4UxHyElF65SjKEVsr4Tpb1bbqleY2Py6G/5b/R3hU4kt4/n8HP6rSAkY4O6 2erz2taW77U802whnXSxJEwrv8sDUu0MxXCcTLoBzf8q2AyXUa46hnP4tJ33PY1EouTi iJ9rxaO1UGYJZiINDW4D+MsMyYYIQ42LU/+eXyDZsbBt1Pthp+OetQtaG7q86bT1AKvY 0oy0rHwZn7dOJCXKkpvChSu+72W8PazaNASK1IbOTnajju2jRnF0EDrIiCpxnDpFfR8w ipWDGFxRJhGNtVCS8Szvg54HvDySXyRXafKwKdw40hZ8c4tir1xOcxZVGbGg55HvdLSx ODFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=TMXuEoHk2L7TE8gnfn8LLUzs0V/OreSOjrbkfArw4GY=; b=sjGNBrmdhtQYUEnDjTvvhdA5K8CYBR+XfcMj0tr0rYKWzeG+uYXU26x4GveEJ2Wm9U EErgNC2B4Qi/TwsQ7w2RUd96+ZvQQqLdjFYVOPH2e73JzBEKaLs3scVwTvbCCvaqRSqZ EAlIvNbkHvk6QR1rE9wmHSPZYMQFm+bYArPWdR+YbGmpDkAGhhuMGK8qKt4b7XvXdxbG c8wpkdhXZ/KwH0PfS1w2jsBqPzG1VHhFVpO2IKtO1GGMq2MY/FTV7SCkE8VSlR7fUPil kQH2+SfH3hmxsS38JhmOAH0KmlDm388tpHFzhBr1JUB+1Wi0DfZ9ahYc8ZDEpu0CY+2f B57A== X-Gm-Message-State: AOAM532ylQzScoSnAQ97jffyLtRN4SbJX6zGPT7vABrGPORi58peCInW k2L4/8bhc3e1T7/uIKoZc90= X-Google-Smtp-Source: ABdhPJytv53TmDTK/vzXjw/XdJxrr6hvYazV+X8ypXzZzN4yuw3OCcSHhVyDH43O6zVKTCXlImEIRA== X-Received: by 2002:a05:6830:1644:: with SMTP id h4mr4472447otr.349.1615144721022; Sun, 07 Mar 2021 11:18:41 -0800 (PST) Received: from ?IPv6:2601:2c3:ca81:7bc0:147a:84dc:a9b:ce74? ([2601:2c3:ca81:7bc0:147a:84dc:a9b:ce74]) by smtp.gmail.com with ESMTPSA id 3sm2149807otn.18.2021.03.07.11.18.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Mar 2021 11:18:40 -0800 (PST) From: Jacob Gelbman Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_EE0FB173-E305-4869-939C-0565716C5FC9" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: Completion script for the ctags program Date: Sun, 7 Mar 2021 13:18:39 -0600 In-Reply-To: <20210224142437.GC9342@tarpaulin.shahaf.local2> Cc: zsh-workers@zsh.org To: Daniel Shahaf References: <31598-1614116362.902856@aI-l.maGv.3QD7> <20210224142437.GC9342@tarpaulin.shahaf.local2> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Seq: 48150 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --Apple-Mail=_EE0FB173-E305-4869-939C-0565716C5FC9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii I attached the new script. --Apple-Mail=_EE0FB173-E305-4869-939C-0565716C5FC9 Content-Disposition: attachment; filename=ctags.txt Content-Type: text/plain; x-unix-mode=0644; name="ctags.txt" Content-Transfer-Encoding: quoted-printable #compdef ctags arduino-ctags ctags-exuberant ctags-universal local context state line expl local -A opt_args local -a arguments if [ -z "$_ctags_type" ]; then local output=3D`ctags --version 2>&1` if [[ "$output" =3D *Universal\ Ctags* ]]; then _ctags_type=3D"universal" elif [[ "$output" =3D *Exuberant\ Ctags* ]]; then _ctags_type=3D"exuberant" elif [[ "$output" =3D *usage:\ ctags* ]]; then _ctags_type=3D"bsd" elif [[ "$output" =3D *Emacs* ]]; then _ctags_type=3D"etags" else _ctags_type=3D"universal" fi fi if [ "$_ctags_type" =3D "etags" ]; then _etags return $? fi _ctags_languages() { _call_program languages $service --list-languages | cut -d" " -f1 } if [[ "$PREFIX" =3D --alias-*=3D* ]]; then _message pattern return 1 elif [[ "$PREFIX" =3D --extras-*=3D* ]]; then _message flags return 1 elif [[ "$PREFIX" =3D --fields-*=3D* ]]; then _message flags return 1 elif [[ "$PREFIX" =3D --input-encoding-*=3D* ]]; then _message encoding return 1 elif [[ "$PREFIX" =3D --kinddef-*=3D* ]]; then _message kind return 1 elif [[ "$PREFIX" =3D --kinds-*=3D* ]]; then _message kind return 1 elif [[ "$PREFIX" =3D --map-*=3D* ]]; then _message pattern return 1 elif [[ "$PREFIX" =3D --mline-regex-*=3D* ]]; then _message pattern return 1 elif [[ "$PREFIX" =3D --param-*=3D* ]]; then _message argument return 1 elif [[ "$PREFIX" =3D --regex-*=3D* ]]; then _message pattern return 1 elif [[ "$PREFIX" =3D --roles-*.*=3D* ]] then _message role return 1 elif [[ "$PREFIX" =3D --roles-*.* ]] then _message kind return 1 fi if [ "$_ctags_type" =3D "universal" ]; then arguments=3D( "-a[append to tags file]" "-B[use backward searching patterns (?...?)]" "-D[give definition for macro]:macro definition:" "-e[output tag file for use with emacs]" {-f+,-o+}"[write tags to specified file]:output file:_files" "-F[use forward searching patterns (/.../)]" "-h[specify a list of file extensions to be treated as include = files]:extensions" "-I[specify a list of tokens to be specially handled]:identifier = list" "-L[read a list of input file names from the specified file]:input = file:_files" "-n[equivalent to --excmd=3Dnumber]" "-N[equivalent to --excmd=3Dpattern]" "(--recurse -R)--recurse=3D-[search files recursively]::bool:(yes = no)" "(--recurse -R)-R[search files recursively]" "-u[equivalent to --sort=3Dno]" "-x[print a tabular cross reference file to stdout]" "--alias--[add a pattern detecting a name, can be used as an alt = name for lang]:language:->languageequals" "--append=3D-[should tags be appended to existing tag = file]:bool:(yes no)" "--etags-include=3D-[include reference to file in emacs style tag = file]:file:_files" "--exclude=3D-[exclude files and directories matching = pattern]:pattern" "--exclude-exception=3D-[don't exclude files and directories = matching pattern even if they match the pattern specified with = --exclude]:pattern" "--excmd=3D-[uses the specified type of ex command to locate = tags]:ex command type:(number pattern mix combine)" "--extras=3D-[include extra tag entries for selected = information]:flags (fFgpqrs)" "--extras--[include own extra tag entries for selected = information]:language:->languageequals" "--fields=3D-[include selected extension fields]:flags = (aCeEfFikKlmnNpPrRsStxzZ)" "--fields--[include selected own extension = fields]:language:->languageequals" "--filter=3D-[behave as a filter, reading file names from stdin and = writing tags to stdout]:bool:(yes no)" "--filter-terminator=3D-[specify string to print to stdout following = the tags for each file parsed when --filter is enabled]:string" "--format=3D-[force output of specified tag file format]:level" "(--guess-language-eagerly -G)"{--guess-language-eagerly,-G}"[guess = the language of input file more eagerly]" {--help,-?}"[display help text]" "--help-full[display help text with experimental features]" "--if0=3D-[should code within #if 0 conditionals be = parsed]:bool:(yes no)" "--input-encoding=3D-[specify encoding of all input files]:encoding" "--input-encoding--[specify encoding of the input = files]:language:->languageequals" "--kinddef--[define new kind for ]:language:->languageequals" "--kinds--[enable/disable tag kinds for = ]:language:->languageequals" "--langdef=3D-[define a new language to be parsed with regular = expressions]:name" "--langmap=3D-[override default mapping of language to input file = extension]:maps" "--language-force=3D-[force all files to be interpreted using = specified language]:language:->language" "--languages=3D-[restrict files scanned to these comma-separated = languages]:language:->languages" "--license[print details of software license]" "--line-directives=3D-[should #line directives be = processed]:bool:(yes no)" "--links=3D-[indicate whether symlinks should be followed]:bool:(yes = no)" "--list-aliases=3D-[list of alias patterns]:language:->language" "--list-excludes[list of exclude patterns for files/dirs]" "--list-extras=3D-[list of extra tag flags]:language:->language" "--list-features[list of compiled features]" "--list-fields=3D-[list of fields]:language:->language" "--list-kinds=3D-[list of all tag kinds for = lang]:language:->language" "--list-kinds-full=3D-[list details of all tag kinds for = lang]:language:->language" "--list-languages[list of supported languages]" "--list-map-extensions=3D-[list of language extensions in = mapping]:language:->language" "--list-map-patterns=3D-[list of language patterns in = mapping]:language:->language" "--list-maps=3D-[list of language mappings (both extensions and = patterns)]:language:->language" "--list-mline-regex-flags[list of flags which can be used in a = multiline regex parser definition]" "--list-params=3D-[list of language parameters. works with = --machinable]:language:->language" "--list-pseudo-tags[list of pseudo tags]" "--list-regex-flags[list of flags which can be used in a regex = parser definition]" "--list-roles=3D-[list of all roles of tag kinds specified for = langs]:language:->language" "--list-subparsers=3D-[list of subparsers for the base = lang]:language:->language" "--machinable=3D-[use tab separated representation in --list-* = output]:bool:(yes no)" "--map--[set, add(+), or remove(-) the map for = ]:language:->languageequals" "--maxdepth=3D-[specify maximum recursion depth]:depth" "--mline-regex--[define multiline regex for locating tags in = ]:language:->languageequals" "--options=3D-[specify file (or dir) from which command line options = should be read]:file:_files" "--options-maybe=3D-[same as --options but doesn't = error]:file:_files" "--optlib-dir=3D-[add or set dir to optlib search path]:dir:_files = -/" "--output-encoding=3D-[the encoding to write the tag file = in]:encoding" "--output-format=3D-[specify the output format]:format:(u-ctags = e-ctags etags xref)" "--param--[set specific parameter]:language:->languageequals" "--pattern-length-limit=3D-[cutoff patterns of tag entries after N = characters]:number" "--print-language[don't make tags file but just print the guessed = lang name for input file]" "--pseudo-tags=3D-[enable/disable emitting pseudo tag named ptag. if = *, enable emitting all pseudo tags]:ptag" "--put-field-prefix[put UCTAGS as prefix for the name of fields = newly introducted in universal ctags]" "--quiet=3D-[don't print notice class messages]:bool:(yes no)" "--regex--[define regex for locating tags in specific = lang]:language:->languageequals" "--roles--[enable/disable tag roles for kinds of = ]:language:->languagedot" "--sort=3D-[should tags be sorted]:argument:(yes no foldcase)" "--tag-relative=3D-[should paths be relative to location of tag = file]:argument:(yes no always never)" "--totals=3D-[print stats about input and tag files]:arguments:(yes = no extra)" "(--verbose -V)--verbose=3D-[enable verbose messages describing = actions]:bool:(yes no)" "(--verbose -V)-V[enable verbose messages describing actions]" "--version[print version]" "--with-list-header=3D-[prepend the column descriptions in --list-* = output]:bool:(yes no)" "*:file:_files" ) elif [ "$_ctags_type" =3D "exuberant" ]; then arguments=3D( "-a[append to tags file]" "-B[use backward searching patterns (?...?)]" "-e[output tag file for use with emacs]" {-f+,-o+}"[write tags to specified file]:output file:_files" "-F[use forward searching patterns (/.../)]" "-h[specify a list of file extensions to be treated as include = files]:extensions" "-I[specify a list of tokens to be specially handled]:identifier = list" "-L[read a list of input file names from the specified file]:input = file:_files" "-n[equivalent to --excmd=3Dnumber]" "-N[equivalent to --excmd=3Dpattern]" "(--recurse -R)--recurse=3D-[search files recursively]::bool:(yes = no)" "(--recurse -R)-R[search files recursively]" "-u[equivalent to --sort=3Dno]" "-x[print a tabular cross reference file to stdout]" "--append=3D-[should tags be appended to existing tag = file]:bool:(yes no)" "--etags-include=3D-[include reference to file in emacs style tag = file]:file:_files" "--exclude=3D-[exclude files and directories matching = pattern]:pattern" "--excmd=3D-[uses the specified type of ex command to locate = tags]:ex command type:(number pattern mix)" "--extra=3D-[include extra tag entries for selected = information]:flags (fg)" "--fields=3D-[include selected extension fields]:flags = (afmikKlnsStz)" "--file-scope=3D-[should tags scoped only for a single file be = included in output]:bool:(yes no)" "--filter=3D-[behave as a filter, reading file names from stdin and = writing tags to stdout]:bool:(yes no)" "--filter-terminator=3D-[specify string to print to stdout following = the tags for each file parsed when --filter is enabled]:string" "--format=3D-[force output of specified tag file format]:level" "--help[display help text]" "--if0=3D-[should code within #if 0 conditionals be = parsed]:bool:(yes no)" "--langdef=3D-[define a new language to be parsed with regular = expressions]:name" "--langmap=3D-[override default mapping of language to input file = extension]:maps" "--language-force=3D-[force all files to be interpreted using = specified language]:language:->language" "--languages=3D-[restrict files scanned to these comma-separated = languages]:language:->languages" "--license[print details of software license]" "--line-directives=3D-[should #line directives be = processed]:bool:(yes no)" "--links=3D-[indicate whether symlinks should be followed]:bool:(yes = no)" "--list-kinds=3D-[list of all tag kinds for = lang]:language:->language" "--list-languages[list of supported languages]" "--list-maps=3D-[list of language mappings (both extensions and = patterns)]:language:->language" "--options=3D-[specify file (or dir) from which command line options = should be read]:file:_files" "--regex--[define regex for locating tags in specific = lang]:language:->language" "--sort=3D-[should tags be sorted]:argument:(yes no foldcase)" "--tag-relative=3D-[should paths be relative to location of tag = file]:argument:(yes no)" "--totals=3D-[print stats about input and tag files]:arguments:(yes = no)" "(--verbose -V)--verbose=3D-[enable verbose messages describing = actions]:bool:(yes no)" "(--verbose -V)-V[enable verbose messages describing actions]" "--version[print version]" "*:file:_files" ) if [[ "$PREFIX" =3D -* ]]; then local -a languages=3D(`_ctags_languages`) local -a languages2 for language in $languages; do arguments+=3D("--$language-kinds=3D-:kinds") done fi elif [ "$_ctags_type" =3D "bsd" ]; then arguments=3D( "-a[append to tags file]" "-B[use backward searching patterns (?...?)]" "-d[create tags for #defines that don't take arguments]" "-F[use forward searching patterns (/.../)]" "-f+[write tags to specified file]:output file:_files" "-t[create tags for typedefs, structs, unions, and enums]" "-u[update the specified files in the tags file]" "-v[an index of the form expected by vgrind(1) is produced]" "-w[suppress warning diagnostics]" "-x[ctags produces a simple function index]" "*:file:_files" ) fi _arguments -s $arguments if [ "$state" =3D "language" ]; then local -a languages=3D(`_ctags_languages`) _wanted languages expl language compadd -a languages elif [ "$state" =3D "languageequals" ]; then local -a languages=3D(`_ctags_languages`) _wanted languages expl language compadd -S =3D -a languages elif [ "$state" =3D "languagedot" ]; then local -a languages=3D(`_ctags_languages`) _wanted languages expl language compadd -S . -a languages elif [ "$state" =3D "languages" ]; then local -a languages=3D(`_ctags_languages`) _values -s , languages $languages fi return $(( compstate[nmatches] > 0 ? 0 : 1 )) --Apple-Mail=_EE0FB173-E305-4869-939C-0565716C5FC9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 24, 2021, at 8:24 AM, Daniel Shahaf = wrote: >=20 > Jacob Gelbman wrote on Wed, Feb 24, 2021 at 01:20:24 -0600: >> #compdef ctags >=20 > apt-file(1) on Debian stable shows a few more names: >=20 > arduino-ctags: /usr/bin/arduino-ctags > emacs-bin-common: /usr/bin/ctags.emacs > emacs-bin-common: /usr/bin/etags.emacs > exuberant-ctags: /usr/bin/ctags-exuberant > universal-ctags: /usr/bin/ctags-universal > xemacs21-bin: /usr/bin/etags.xemacs21 >=20 > I assume at least some of these should be added to the #compdef line. = Would > you do the honours? I added arduinio-ctags, ctags-exuberant, and ctags-universal to the = #compdef line. I did not put ctags.emacs, etags.emacs, etags.xemacs21 = because they probably belong at the top of the _etags script. >=20 >> "--alias-=3D[add a pattern detecting a name, can be used as = an alt name for lang]:pattern" >=20 > As Oliver said, literal angle brackets in the option name to be > completed aren't especially helpful. In fact, I'll go as far as to = say > I don't want users to run into it in released code. Please change = them. >=20 > You can use _call_program with --list-languages to generate the right = set of > option names dynamically. >=20 I made it so they are now shown --alias-, if they press tab again, they = can complete the option name further with the language = (--alias-ObjectiveC or --alias-Perl etc). So unless they enter the = prefix, they won't be shown too many options. For exuberant ctags, there's one option like ---kinds, which = doesn't have a unique prefix, like --alias- (--alias- is the = prefix), so I added all these options to the main _aguments call. >> elif [ "$_ctags_type" =3D "exuberant" ]; then >> arguments=3D( >> "-a[append to tags file]" >> "-B[use backward searching patterns (?...?)]" >> "-e[output tag file for use with emacs]" >> "-f[write tags to specified file. - is stdout]:file:_files" >=20 > Is the argument to the -f option allowed to be pasted to it? If so, = s/-f/-f+/. It can. I changed it. >=20 > Also, s/:file:/:output file:/. That part of the string is a = user-facing > message, so the extra detail is helpful. >=20 > Also, you can drop the "- is stdout" part. The descriptions are only > a summary of the functionality; they aren't meant to be a complete = copy of > the manual. Done. >=20 >> "-F[use forward searching patterns (/.../)]" >> "-h[specify list of file extensions to be treated as include = files]:" >=20 > Write something after the colon. >=20 >> "-I[a list of tokens to be specifically handled is read from = either the command line or the specified file]:" >=20 > The thing in brackets doesn't describe the action of the option. = Please edit. >=20 >> "-L[a list of input file names is read from the specified file. - = is stdin]:file:_files" >=20 > Rephrase in the imperative. All done. >=20 >> "-R[equivalent to --recurse]" >=20 > This is normally rendered as: >=20 > '(-r --recurse)'{-R,--recurse}'[description]' I couldn't quite combine -R and --recurse like that since --recurse = takes an argument like --recurse=3Dyes and -R doesn't. -R=3Dyes is an = error. But I gave them the same description, so they'll appear on the = same line. I did the same for --verbose and -V, and = --guess-language-eagerly and -G. >=20 >> "--fields=3D[include selected extension fields (flags = afmikKlnsStz)]:flags" >=20 > Recommend to move the afmikKlnsStz thing to after the colon, so it'll = be > shown at a more appropriate point. Also, it would be helpful to = display > descriptions to the flags using, e.g., =C2=ABcompset=C2=BB (for the = leading plus > sign) followed by =C2=AB_values -s ''=C2=BB. I moved the possible values to the argument description, but I don=E2=80=99= t have enough time to figure out how to complete them automatically = right now. >=20 >> "--file-scope=3D[should tags scoped only for a single file be = included in output]:bool:(yes no)" >> "--filter=3D[behave as a filter, reading file names from stdin and = writing tags to stdout]:bool:(yes no)" >> "--filter-terminator=3D[specify string to print to stdout = following the tags for each file parsed when --filter is = enabled]:string" >> "--format=3D[force output of specified tag file format]:level" >> "--help[help text]" >=20 > "help text" is just a noun phrase. Please use complete decsriptions. >=20 > Please use exclusions if needed (=C2=AB'(--foo)--bar[baz]'=C2=BB). Done. >=20 >> "--language-force=3D[force all files to be interpreted using = specified language]:language:->language" >> "--languages=3D[restrict files scanned to these comma-separated = languages]:language:->languages" >=20 > Can't say I'm a fan of having two states that differ by a single = letter, > but so be it. >=20 >> "--recurse=3D[recurse]:bool:(yes no)" >=20 > Fix the bracketed description. It=E2=80=99s now =E2=80=9Csearch files recursively=E2=80=9D. >=20 >> _arguments $arguments >=20 > Pass any arguments to _arguments that may be needed (for > instance, -s). >=20 Done. >> if [[ "$state" =3D language* ]]; then >> local -a languages >> languages=3D(`ctags --list-languages | cut -d" " -f1`) >=20 > Use _call_program and $service. Done. >=20 >> if [ "$state" =3D "language" ]; then >> _wanted languages expl language compadd $languages >=20 > Don't pass unsanitized command output to a builtin. In this case, > =C2=ABcompadd -a languages=C2=BB would do. Done. >=20 >> elif [ "$state" =3D "languages" ]; then >> _values -s , languages $languages >=20 > Don't pass unsanitized command output to a builtin. I don't know the > fix off the top of my head. >=20 > Thanks for the patch, and especially for adding exubertant and BSD = ctags > support! >=20 > Daniel >=20 --Apple-Mail=_EE0FB173-E305-4869-939C-0565716C5FC9--