* Re: =alias [not found] <unknown997179051@fake.primenet.com.au> @ 2001-08-07 10:24 ` Geoff Wing 0 siblings, 0 replies; 4+ messages in thread From: Geoff Wing @ 2001-08-07 10:24 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh Hackers Peter Stephenson <pws@csr.com> typed: :I wrote: :> Is there anybody out there who wouldn't shout for joy if we removed the :> alias-lookup part of =-substitution so that it only expanded command paths? :It seems not. Just the rest of us who are shouting for joy with it taken out! Hip hip... :-) Regards, -- Geoff Wing : <gcw@pobox.com> Rxvt Stuff : <gcw@rxvt.org> Zsh Stuff : <gcw@zsh.org> ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <Tc0a88d01551023f6c0@mailsweeper01.cambridgesiliconradio.com>]
* Re: =alias [not found] <Tc0a88d01551023f6c0@mailsweeper01.cambridgesiliconradio.com> @ 2001-08-07 10:10 ` Peter Stephenson 2001-08-07 11:22 ` =alias Oliver Kiddle 0 siblings, 1 reply; 4+ messages in thread From: Peter Stephenson @ 2001-08-07 10:10 UTC (permalink / raw) To: Zsh hackers list I wrote: > Is there anybody out there who wouldn't shout for joy if we removed the > alias-lookup part of =-substitution so that it only expanded command paths? It seems not. Index: Src/subst.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/subst.c,v retrieving revision 1.20 diff -u -r1.20 subst.c --- Src/subst.c 2001/06/12 10:34:57 1.20 +++ Src/subst.c 2001/08/07 10:09:02 @@ -414,15 +414,9 @@ sav = *pp; *pp = 0; if (!(cnam = findcmd(str + 1, 1))) { - Alias a = (Alias) aliastab->getnode(aliastab, str + 1); - - if (a) - cnam = a->text; - else { - if (isset(NOMATCH)) - zerr("%s not found", str + 1, 0); - return 0; - } + if (isset(NOMATCH)) + zerr("%s not found", str + 1, 0); + return 0; } *namptr = dupstring(cnam); if (sav) { Index: Doc/Zsh/expn.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v retrieving revision 1.33 diff -u -r1.33 expn.yo --- Doc/Zsh/expn.yo 2001/07/25 15:59:23 1.33 +++ Doc/Zsh/expn.yo 2001/08/07 10:09:02 @@ -1092,11 +1092,9 @@ If a word begins with an unquoted `tt(=)' and the tt(EQUALS) option is set, the remainder of the word is taken as the -name of a command or alias. If a command +name of a command. If a command exists by that name, the word is replaced by the full pathname of the command. -If an alias exists by that name, the word -is replaced with the text of the alias. Filename expansion is performed on the right hand side of a parameter assignment, including those appearing after commands of the -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ********************************************************************** ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: =alias 2001-08-07 10:10 ` =alias Peter Stephenson @ 2001-08-07 11:22 ` Oliver Kiddle 2001-08-07 14:05 ` =alias Peter Stephenson 0 siblings, 1 reply; 4+ messages in thread From: Oliver Kiddle @ 2001-08-07 11:22 UTC (permalink / raw) To: Zsh hackers list Peter Stephenson wrote: > > I wrote: > > Is there anybody out there who wouldn't shout for joy if we removed the > > alias-lookup part of =-substitution so that it only expanded command paths? > > It seems not. Good. So we don't need to complete aliases in the equal context anymore. What I think would be useful though is if equals expansion worked for autoloaded functions, expanding to the full name of the file holding the function. Or if that would cause problems, some sort of similar way such as an option to functions or autoload? Oliver Index: Completion/Zsh/Context/_equal =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Context/_equal,v retrieving revision 1.1 diff -u -r1.1 _equal --- Completion/Zsh/Context/_equal 2001/04/02 11:22:55 1.1 +++ Completion/Zsh/Context/_equal 2001/08/07 11:17:20 @@ -1,9 +1,3 @@ #compdef -equal- -local args - -args=( "$@" ) - -_alternative -O args \ - 'commands:command:compadd -k commands' \ - 'aliases:alias:compadd -k aliases' +_wanted commands expl command compadd -k commands ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: =alias 2001-08-07 11:22 ` =alias Oliver Kiddle @ 2001-08-07 14:05 ` Peter Stephenson 0 siblings, 0 replies; 4+ messages in thread From: Peter Stephenson @ 2001-08-07 14:05 UTC (permalink / raw) To: Zsh hackers list Oliver Kiddle wrote: > What I think would be useful though is if equals expansion worked for > autoloaded functions, expanding to the full name of the file holding the > function. I don't think that would be a big improvement on having aliases expanded; you don't want to execute the filename produced. > Or if that would cause problems, some sort of similar way such > as an option to functions or autoload? Or maybe an addition to zsh/parameter. I suppose we ought to think about moving the zsh/parameter parameters into namespaces, when we have namespaces. -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ********************************************************************** ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-08-07 14:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <unknown997179051@fake.primenet.com.au> 2001-08-07 10:24 ` =alias Geoff Wing [not found] <Tc0a88d01551023f6c0@mailsweeper01.cambridgesiliconradio.com> 2001-08-07 10:10 ` =alias Peter Stephenson 2001-08-07 11:22 ` =alias Oliver Kiddle 2001-08-07 14:05 ` =alias Peter Stephenson
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).