Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Named directories
- X-seq: zsh-users 8533
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Named directories
- Date: Mon, 21 Feb 2005 14:31:14 +0000
- In-reply-to: <2e24629722633f291ea82664e14cbc5d@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2e24629722633f291ea82664e14cbc5d@xxxxxxxxxx>
=?ISO-8859-1?Q?Mika_Sepp=E4nen?= wrote:
> Hi all,
>
> If my homedir is /home/foo and I have named directory:
>
> work=/home/foo/bar
>
> Then if I switch to that dir (cd work), %~ expands to ~/bar. Is there
> any way to make it expand to ~work?
You need to refer to "~work" at least once; the usual trick is to put
: ~work
in your .zshrc after defining the directory. You can also "setopt
autonamedirs" to make all such parameters eligible for this
replacement.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author