zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: schaefer@nbn.com
Cc: mdb@cdc.noaa.gov, zsh-workers@math.gatech.edu, clive@epos.demon.co.uk
Subject: Re: zsh.texi
Date: Sat, 15 Jun 1996 03:53:40 +0200 (MET DST)	[thread overview]
Message-ID: <199606150153.DAA00877@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <960612235602.ZM31052@candle.brasslantern.com> from Bart Schaefer at "Jun 12, 96 11:55:59 pm"

Bart Schaefer wrote:
> I'm just glancing at the programmable completion section at the moment.
> Some of it is still pretty hard to decipher.  Here's an example:
> 
> 
> -d This can be combined with -F, -B, -w, -a, -R and -G to get names of
>        disabled functions, builtins, reserved words or aliases. 
> -e Without -d this option has no effect. Otherwise this can be combined
>        with -F, -B, -w, -a, -R and -G to get names of functions, builtins,
>        reserved words or aliases even if they are disabled. 
> 
> 
> That stuff under -e doesn't make sense to me -- Without -d, has no effect?
> You mean I have to use `compctl -d -e ...'?  Why? -- and it conflicts with
> the zshcompctl.man description:
> 
> -e Names of executable (and enabled) commands.

Sorry for the late response but I was away in the last few days.  Actually
in beta20 I corrected the documentation of compctl -e and compctl -d, and I
also changed its behaviout a little bit.  If you try compctl -e and compctl
-d in any zsh version you'll see that it does not behave as it is
documented.  In beta20 it behaved as described above.  -e or -d only have
effect if combined with -F, -B, -w, -a, -R or -G.  But these flags by
default only complete enabled commands, so compctl -e has no effect
(because it is assumed as default).  This means that -e is only necessary
if you'd like to complete both enabled and disabled commands when you use
-ed.  This may seem to be illogical.  The logical solution is to list
enabled commands by default, but with -d, list only disabled ones and with
an other flag list all of them but this would be incompatible with the old
versions (but since -e and -d was not documented correctly this may not be
a big problem).

Before beta20 the above options listed all builtins/aliases/functions even
if they were disabled.  Before beta20 there were no commands to complete
external commands or reserved words.  These new flags were added in beta20.

There are some problems with compctl -L output in beta20 which I've already
fixed (but I did not send patch, it'll be in beta21).  The maual still
needs some corrections.  The description of -, command, noglob and exec
prefixes should probably be moved into zshbuiltins.man because these are
builtins now.  But the present location may be better for these so it may
be better to keep them there noting that these are builtins, remove these
from the reserved word list and add to zshbuiltins.man with pointers to the
documentation in zshmisc(1).

There will be some other changes in beta21 which require changes in the
maual.  I rewrote redirection handling to conform POSIX.  In beta21 in a
>& $foo redirection $foo will be expanded first, and if the result is a
number, - or p, that filenumber is duplicated, a file is closed or the
output is written to the coprocess.  Otherwise >& redirects both stdout and
stderr.  The &>, &>|, &>> etc. syntax can be used for redirecting both
stdout and stderr when the filename is a number or - or p.  This was taken
from bash.

I'd like to implement <> redirection as well which is often quite useful
and it is required by POSIX as well.  When not in sh/ksh mode <> will only
be recocnized as a redirection if it is delimited from the word before and
after it or if it is immediately preceeded by a digit.  E.g.
% foo arguments 2<> bar      # redirection
% foo arguments2<>  bar      # numeric glob
% foo arguments 22<> bar     # numeric glob
% foo arguments <>bar        # numeric glob
% foo arguments <> bar       # redirection
% foo arguments <-> bar      # numeric glob

In sh/ksh mode <> will always be interpreted as a redirection and <-> will
be required to match an arbitrary number.

Zoltan



  reply	other threads:[~1996-06-15  2:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-10 15:52 zsh.texi Clive Messer
1996-06-10 16:17 ` zsh.texi Hrvoje Niksic
1996-06-10 16:39 ` zsh.texi Zoltan Hidvegi
1996-06-10 19:01   ` zsh.texi Clive Messer
1996-06-13  5:25 ` zsh.texi Mark Borges
1996-06-13  6:26   ` zsh.texi Bart Schaefer
1996-06-13 13:49     ` zsh.texi Clive Messer
1996-06-13 15:30       ` zsh.texi Bart Schaefer
1996-06-13 17:19       ` zsh.texi Mark Borges
1996-06-13  6:55   ` zsh.texi Bart Schaefer
1996-06-15  1:53     ` Zoltan Hidvegi [this message]
1996-06-15  7:44       ` zsh.texi Zefram
1996-06-15 22:08         ` <> redirection operator (was: zsh.texi) Zoltan Hidvegi
1996-06-16 13:23           ` Zefram
1996-06-17 13:10             ` Zoltan Hidvegi
1996-06-17 13:56               ` Peter Stephenson
1996-06-17 15:16                 ` Peter Whaite
1996-06-13  7:18   ` zsh.texi Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199606150153.DAA00877@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=clive@epos.demon.co.uk \
    --cc=mdb@cdc.noaa.gov \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).