From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13812 invoked by alias); 18 Oct 2011 14:44:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29823 Received: (qmail 9910 invoked from network); 18 Oct 2011 14:44:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ruderich.org designates 178.63.68.96 as permitted sender) Date: Tue, 18 Oct 2011 16:39:00 +0200 From: Simon Ruderich To: zsh-workers@zsh.org Subject: PATCH: Completion/Unix/Command/_perl: Update for 5.10.1. Message-ID: <11dd7fd1d499731345e12d4739a3673c5b125ff5.1318948530.git.simon@ruderich.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=_zucker.schokokeks.org-8139-1318948743-0001-2" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2011-04-20) --=_zucker.schokokeks.org-8139-1318948743-0001-2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable --- Hello, This patch updates _perl for Perl 5.10.1. My experience with the completion is limited so if you find any mistakes or improvements please tell me. Regards, Simon Completion/Unix/Command/_perl | 73 ++++++++++++++++++++++++++++++++++---= --- 1 files changed, 62 insertions(+), 11 deletions(-) diff --git a/Completion/Unix/Command/_perl b/Completion/Unix/Command/_perl index 20d9f2d..18e01e5 100644 --- a/Completion/Unix/Command/_perl +++ b/Completion/Unix/Command/_perl @@ -3,17 +3,23 @@ # zsh completion code for the Perl interpreter # Adam Spiers # +# Completions currently based on Perl 5.10.1. _perl () { _arguments -s \ - '-0-:input record separator in octal (\0, if no argument): ' \ + '-0-[input record separator ($/)]:$/ in octal or hex (\0, if no argume= nt)' \ '-a[autosplit mode with -n or -p (splits $_ into @F)]' \ + '-C-[control some unicode features]: :_perl_unicode_flags' \ "-c[check syntax only (runs BEGIN and END blocks)]" \ - '-d[run scripts under debugger]' \ - '-d\:-[run under control of a debugging/tracing module]:debugging/trac= ing module:_perl_modules --strip-prefix --perl-hierarchy=3DDevel' \ - '-D-:set debugging flags (argument is a bit mask or flags): ' \ - "*-e+:one line of script. Several -e's allowed. Omit [programfile]." \ - "-F-:split() pattern for autosplit (-a). The //'s are optional.: " \ + '( -dt -d: -dt:)-d[run scripts under debugger]' \ + '(-d -d: -dt:)-dt[run scripts under debugger (debugged code uses t= hreads)]' \ + '(-d -dt -dt:)-d\:-[run under control of a debugging/tracing modul= e]:debugging/tracing module:_perl_modules --strip-prefix --perl-hierarchy= =3DDevel' \ + '(-d -dt -d: )-dt\:-[run under control of a debugging/tracing modu= le (debugged coded uses threads)]:debugging/tracing module:_perl_modules --= strip-prefix --perl-hierarchy=3DDevel' \ + '-D-[set debugging flags]: :_perl_debugging_flags' \ + '( -E)*-e+[run one line of program]:one line of program' \ + '(-e )*-E+[like -e but enable all optional features]:one line of pro= gram: ' \ + '-f[disable executing $Config{sitelib}/sitecustomize.pl at startup]' \ + '-F-[split() pattern for autosplit (-a)]:split() pattern, // is option= al' \ '-h[list help summary]' \ '-i-[edit <> files in place (make backup if extension supplied)]:backu= p file extension: ' \ '*-I-[specify @INC/#include directory (may be used more than once)]:in= clude path:_files -/' \ @@ -21,18 +27,21 @@ _perl () { \*{-m,-M}"-[module.. executes \`use/no module...' before executing you= r script]:module:_perl_m_opt" \ "-n[assume 'while (<>) { ... }' loop around your script]" \ "-p[assume loop like -n but print line also like sed]" \ - "-P[run script through C preprocessor before compilation]" \ + '-P[run script through C preprocessor before compilation (deprecated)]= ' \ "-s[enable some switch parsing for switches after script name]" \ "-S[look for the script using PATH environment variable]" \ - "-T[turn on tainted checks]" \ - "-u[dump core after parsing script]" \ + '( -T)-t[turn on taint checks but only issue warnings]' \ + '(-t )-T[turn on taint checks]' \ + '-u[dump core after parsing script (obsolete)]' \ "-U[allow unsafe operations]" \ "-v[print version number, patchlevel plus VERY IMPORTANT perl info]" \ "-V-[print perl configuration information]:configuration keys:_perl_co= nfig_vars" \ - '-w[turn warnings on for compilation of your script. Recommended]' \ + '( -W -X)-w[turn warnings on for compilation of your script (recomme= nded)]' \ + "(-w -X)-W[enable all warnings (ignores 'no warnings')]" \ + "(-w -W )-X[disable all warnings (ignores 'use warnings')]" \ '-x-[strip off text before #!perl line and perhaps cd to directory]:di= rectory to cd to:_files -/' \ '1:Perl script:_files -/ -g "*.(p[ml]|PL|t)(-.)"' \ - '*::args: _normal' + '*::args: _normal' } _perl_m_opt () { @@ -60,4 +69,46 @@ _perl_config_vars () { compadd "$expl[@]" $add_colon -S$delimiter -q -a _perl_config_vars } +_perl_unicode_flags () { + _values -s '' 'unicode bitmask or flags' \ + 'I[ 1 STDIN is assumed to be in UTF-8]' \ + 'O[ 2 STDOUT will be in UTF-8]' \ + 'E[ 4 STDERR will be in UTF-8]' \ + 'S[ 7 I + O + E]' \ + 'i[ 8 UTF-8 is the default PerlIO layer for input streams]' \ + 'o[ 16 UTF-8 is the default PerlIO layer for output streams]' \ + 'D[ 24 i + o]' \ + 'A[ 32 the @ARGV elements are expected to be strings encoded in UTF-8]= ' \ + 'L[ 64 make "IOEioA" conditional on the locale environment variables]'= \ + 'a[256 set ${^UTF8CACHE} to -1, used for debugging]' \ +} + +_perl_debugging_flags () { + _values -s '' 'debugging bitmask or flags' \ + 'p[ 1 Tokenizing and parsing (with v, displays parse stack)]' \ + 's[ 2 Stack snapshots (with v, displays all stacks)]' \ + 'l[ 4 Context (loop) stack processing]' \ + 't[ 8 Trace execution]' \ + 'o[ 16 Method and overloading resolution]' \ + 'c[ 32 String/numeric conversions]' \ + 'P[ 64 Print profiling info, preprocessor command for -P, source f= ile input state]' \ + 'm[ 128 Memory and SV allocation]' \ + 'f[ 256 Format processing]' \ + 'r[ 512 Regular expression parsing and execution]' \ + 'x[ 1024 Syntax tree dump]' \ + 'u[ 2048 Tainting checks]' \ + 'U[ 4096 Unofficial, User hacking (reserved for private, unreleased = use)]' \ + 'H[ 8192 Hash dump -- usurps values()]' \ + 'X[ 16384 Scratchpad allocation]' \ + 'D[ 32768 Cleaning up]' \ + 'S[ 66536 Thread synchronization]' \ + 'T[ 131072 Tokenising]' \ + 'R[ 262144 Include reference counts of dumped variables (eg when using= -Ds)]' \ + 'J[ 524288 Do not s,t,P-debug (Jump over) opcodes within package DB]' \ + 'v[1048576 Verbose: use in conjunction with other flags]' \ + 'C[2097152 Copy On Write]' \ + 'A[4194304 Consistency checks on internal structures]' \ + 'q[8388608 quiet - currently only suppresses the "EXECUTING" message]'= \ +} + _perl "$@" --=20 1.7.7 --=20 + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9 --=_zucker.schokokeks.org-8139-1318948743-0001-2 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJOnY+DAAoJEJL+/bfkTDL5oqYP/06ff/JYkyQiR1iw97np71oI RpxSPZdNgrBBqsWtXcx4Uc1XdHOldFD2fE7mQhodEVyPAmPKR0Scc6L23cQHejxf DfRpx+jtVO/+fFzvTn3m4akPTJa1V13ykuc2O4Tx7Nb1DwkJ4HIdGGRjAEoh7coC o4+P4m8ViQ3KYoM9CBC3ZD7Z4O3VEFdq//LjW7zJlb2gBQrNGhQEokqun83fwOoX VZwe/tjQ1Ek5dtya0j2oWgh95r0PMU4szoS+aBsfcKrFECSXnogI45GY34GQ0S5N 85qPyQ8xVvnUZmvmNa/wzBCT0aUHQATNuXjpmgAO4L2gLS8BbdwgpX4v1Ue0nuef ppKPT/vmiDPuP05MC8kF+aoiLRNznwT/nIucZPS+VtDz2U0zcM43u2QnmyBOs+m6 1vdNat5iLsnafY/ihRoyHOhXlHj6iV5d7UPKt0eABVzrxnb7Vd49dn0USrhMg4C/ jCC1Tokii5GnwgDoE9gAord2PHla6/BxsaLjtRIqVIh4KVve8TkdNN3X6mBduS1G gP6bwZf3c55N8YlQRWzu6DEMXev/gEq/wMksN7vvVqQ8skNZsJYr8cueZjJvo1kJ P71Bu0SJDTHuwtVr6GLC6xUTQbQVHD/F+vwPoxKlta3cxYGDDJgq3GjxA/QG0EF0 cQ7nxUiE/F6r0VXmROsl =sRBR -----END PGP SIGNATURE----- --=_zucker.schokokeks.org-8139-1318948743-0001-2--