From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id MAA11973 for ; Sat, 15 Jun 1996 12:52:19 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id WAA15596; Fri, 14 Jun 1996 22:44:23 -0400 (EDT) Resent-Date: Fri, 14 Jun 1996 22:44:23 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199606150153.DAA00877@hzoli.ppp.cs.elte.hu> Subject: Re: zsh.texi To: schaefer@nbn.com Date: Sat, 15 Jun 1996 03:53:40 +0200 (MET DST) Cc: mdb@cdc.noaa.gov, zsh-workers@math.gatech.edu, clive@epos.demon.co.uk In-Reply-To: <960612235602.ZM31052@candle.brasslantern.com> from Bart Schaefer at "Jun 12, 96 11:55:59 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"tL51O3.0.Zp3.6EYmn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1354 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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