* expansion after =?
@ 2003-07-02 17:31 Seth Kurtzberg
2003-07-02 17:36 ` Dan Nelson
2003-07-02 17:39 ` Peter Stephenson
0 siblings, 2 replies; 7+ messages in thread
From: Seth Kurtzberg @ 2003-07-02 17:31 UTC (permalink / raw)
To: zsh-users
Hello list,
Is there a configuration parameter or option that enables path completion after equals, for example, export ENVVAR=/some/path/name? I've been using zsh for some months now, and this is the only thing that bash does that I find missing in zsh. But perhaps the behavior can be turned on in some way?
TIA
--
Seth Kurtzberg
MIS Corp
480-661-1849
seth@cql.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: expansion after =?
2003-07-02 17:31 expansion after =? Seth Kurtzberg
@ 2003-07-02 17:36 ` Dan Nelson
2003-07-02 17:40 ` Seth Kurtzberg
2003-07-02 17:41 ` Seth Kurtzberg
2003-07-02 17:39 ` Peter Stephenson
1 sibling, 2 replies; 7+ messages in thread
From: Dan Nelson @ 2003-07-02 17:36 UTC (permalink / raw)
To: Seth Kurtzberg; +Cc: zsh-users
In the last episode (Jul 02), Seth Kurtzberg said:
> Hello list,
>
> Is there a configuration parameter or option that enables path
> completion after equals, for example, export ENVVAR=/some/path/name?
> I've been using zsh for some months now, and this is the only thing
> that bash does that I find missing in zsh. But perhaps the behavior
> can be turned on in some way?
Try two equals signs, one for the assignment, and one for path
expansion.
dan% PAGER==less
dan% echo $PAGER
/usr/bin/less
dan%
It's documented under FILENAME EXPANSION:
If a word begins with an unquoted `=' and the EQUALS
option is set, the remainder of the word is taken as the
name of a command or alias. 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.
I didn't even know bash could do path expansion.
--
Dan Nelson
dnelson@allantgroup.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: expansion after =?
2003-07-02 17:31 expansion after =? Seth Kurtzberg
2003-07-02 17:36 ` Dan Nelson
@ 2003-07-02 17:39 ` Peter Stephenson
2003-07-02 18:15 ` Seth Kurtzberg
1 sibling, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2003-07-02 17:39 UTC (permalink / raw)
To: zsh-users
Seth Kurtzberg wrote:
> Is there a configuration parameter or option that enables path completion aft
> er equals, for example, export ENVVAR=/some/path/name? I've been using zsh f
> or some months now, and this is the only thing that bash does that I find mis
> sing in zsh. But perhaps the behavior can be turned on in some way?
If you are using the new completion system (autoload -U compinit;
compinit) then this will work automatically. The old completion system
didn't have this built in, though you could use compctl to enable it;
you don't say what version of zsh you are using, but if it is 4.x you
are likely to get far better results with the new system.
You might also be interested in the option MAGIC_EQUAL_SUBST; this forces
~'s to be expanded after any ='s.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
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] 7+ messages in thread
* Re: expansion after =?
2003-07-02 17:36 ` Dan Nelson
@ 2003-07-02 17:40 ` Seth Kurtzberg
2003-07-02 17:41 ` Seth Kurtzberg
1 sibling, 0 replies; 7+ messages in thread
From: Seth Kurtzberg @ 2003-07-02 17:40 UTC (permalink / raw)
To: Dan Nelson; +Cc: zsh-users
On Wed, 2 Jul 2003 12:36:23 -0500
Dan Nelson <dnelson@allantgroup.com> wrote:
> In the last episode (Jul 02), Seth Kurtzberg said:
> > Hello list,
> >
> > Is there a configuration parameter or option that enables path
> > completion after equals, for example, export ENVVAR=/some/path/name?
> > I've been using zsh for some months now, and this is the only thing
> > that bash does that I find missing in zsh. But perhaps the behavior
> > can be turned on in some way?
>
> Try two equals signs, one for the assignment, and one for path
> expansion.
>
> dan% PAGER==less
> dan% echo $PAGER
> /usr/bin/less
> dan%
>
> It's documented under FILENAME EXPANSION:
>
> If a word begins with an unquoted `=' and the EQUALS
> option is set, the remainder of the word is taken as the
> name of a command or alias. 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.
Thanks much. I did look in the docs but somehow I missed it.
>
> I didn't even know bash could do path expansion.
It doesn't do it nearly as well as zsh, but it does manage to more or less do it. But I would never go back to bash after using zsh.
>
> --
> Dan Nelson
> dnelson@allantgroup.com
>
--
Seth Kurtzberg
MIS Corp
480-661-1849
seth@cql.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: expansion after =?
2003-07-02 17:36 ` Dan Nelson
2003-07-02 17:40 ` Seth Kurtzberg
@ 2003-07-02 17:41 ` Seth Kurtzberg
1 sibling, 0 replies; 7+ messages in thread
From: Seth Kurtzberg @ 2003-07-02 17:41 UTC (permalink / raw)
To: Dan Nelson; +Cc: zsh-users
Sorry, I responded without reading quite carefully enough.
I did know about this feature but it isn't what I'm referring to, so let me be more clear (hopefully).
I'm talking not about this type of expansion (sorry if I didn't use the correct terminology). I'm talking about the case where you use completion, with the tab key, while setting an environment variable.
On Wed, 2 Jul 2003 12:36:23 -0500
Dan Nelson <dnelson@allantgroup.com> wrote:
> In the last episode (Jul 02), Seth Kurtzberg said:
> > Hello list,
> >
> > Is there a configuration parameter or option that enables path
> > completion after equals, for example, export ENVVAR=/some/path/name?
> > I've been using zsh for some months now, and this is the only thing
> > that bash does that I find missing in zsh. But perhaps the behavior
> > can be turned on in some way?
>
> Try two equals signs, one for the assignment, and one for path
> expansion.
>
> dan% PAGER==less
> dan% echo $PAGER
> /usr/bin/less
> dan%
>
> It's documented under FILENAME EXPANSION:
>
> If a word begins with an unquoted `=' and the EQUALS
> option is set, the remainder of the word is taken as the
> name of a command or alias. 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.
>
> I didn't even know bash could do path expansion.
>
> --
> Dan Nelson
> dnelson@allantgroup.com
>
--
Seth Kurtzberg
MIS Corp
480-661-1849
seth@cql.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: expansion after =?
2003-07-02 17:39 ` Peter Stephenson
@ 2003-07-02 18:15 ` Seth Kurtzberg
2003-07-03 11:29 ` Peter Stephenson
0 siblings, 1 reply; 7+ messages in thread
From: Seth Kurtzberg @ 2003-07-02 18:15 UTC (permalink / raw)
To: Peter Stephenson; +Cc: zsh-users
On Wed, 02 Jul 2003 18:39:32 +0100
Peter Stephenson <pws@csr.com> wrote:
> Seth Kurtzberg wrote:
> > Is there a configuration parameter or option that enables path completion aft
> > er equals, for example, export ENVVAR=/some/path/name? I've been using zsh f
> > or some months now, and this is the only thing that bash does that I find mis
> > sing in zsh. But perhaps the behavior can be turned on in some way?
>
> If you are using the new completion system (autoload -U compinit;
> compinit) then this will work automatically. The old completion system
> didn't have this built in, though you could use compctl to enable it;
> you don't say what version of zsh you are using, but if it is 4.x you
> are likely to get far better results with the new system.
Thanks much. I'm using 4.0.6, so I have the new features. I'm going to update to 4.0.7 just in case. Or, would you suggest the development release?
With 4.0.6, the old completion system is used by default if I don't do the autoload sequence above?
>
> You might also be interested in the option MAGIC_EQUAL_SUBST; this forces
> ~'s to be expanded after any ='s.
Yes, that will also be helpful.
Again, thanks for an outstanding software tool.
>
> --
> Peter Stephenson <pws@csr.com> Software Engineer
> CSR Ltd., Science Park, Milton Road,
> Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
>
>
> **********************************************************************
> 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.
> **********************************************************************
>
>
--
Seth Kurtzberg
MIS Corp
480-661-1849
seth@cql.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: expansion after =?
2003-07-02 18:15 ` Seth Kurtzberg
@ 2003-07-03 11:29 ` Peter Stephenson
0 siblings, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2003-07-03 11:29 UTC (permalink / raw)
To: zsh-users
Seth Kurtzberg wrote:
> Thanks much. I'm using 4.0.6, so I have the new features. I'm going to upda
> te to 4.0.7 just in case. Or, would you suggest the development release?
You should be fine with 4.1.1, but you have to be using some pretty
sophisticated features to notice much difference. (On the other hand
that includes most of the completion system :-).)
> With 4.0.6, the old completion system is used by default if I don't do the au
> toload sequence above?
Yes, the new completion system is never enabled by default since it's
function-based; the shell never automatically runs functions. Some
pre-packaged distributions enable it in /etc/zshrc.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
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] 7+ messages in thread
end of thread, other threads:[~2003-07-03 11:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-02 17:31 expansion after =? Seth Kurtzberg
2003-07-02 17:36 ` Dan Nelson
2003-07-02 17:40 ` Seth Kurtzberg
2003-07-02 17:41 ` Seth Kurtzberg
2003-07-02 17:39 ` Peter Stephenson
2003-07-02 18:15 ` Seth Kurtzberg
2003-07-03 11:29 ` 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).