* directory aliases
@ 2011-07-30 16:36 sergio
2011-07-30 17:53 ` Jérémie Roquet
0 siblings, 1 reply; 2+ messages in thread
From: sergio @ 2011-07-30 16:36 UTC (permalink / raw)
To: zsh-users
Hello.
Is there any way to make directory aliases, so it will be possible to do so:
(for example projects is an alias for /full_long_path/projects)
% cd projects
% projects # auto_cd
% ls projects
% less projects/some-project
from any directory?
cdpath is only for cd
alias projects=/full_long_path/projects is only for auto_cd
~ expansion requires '~' prefix for directory
It's good for unambiguousness. But I think about user home when I see
~somethig. May be some prefix (for example dot or hyphen) will help to
distinguish such aliases from users homes.
hash -d .projects=/full_long_path/projects
works, but how to make this with hyphen (-) ?
--
sergio.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: directory aliases
2011-07-30 16:36 directory aliases sergio
@ 2011-07-30 17:53 ` Jérémie Roquet
0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Roquet @ 2011-07-30 17:53 UTC (permalink / raw)
To: Zsh Users; +Cc: sergio
Hi Sergio,
2011/7/30 sergio <mailbox@sergio.spb.ru>:
> ~ expansion requires '~' prefix for directory
> It's good for unambiguousness. But I think about user home when I see
> ~somethig. May be some prefix (for example dot or hyphen) will help to
> distinguish such aliases from users homes.
>
> hash -d .projects=/full_long_path/projects
> works, but how to make this with hyphen (-) ?
hash -d -- -projects=/full_long_path/projects
Best regards,
--
Jérémie
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-30 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-30 16:36 directory aliases sergio
2011-07-30 17:53 ` Jérémie Roquet
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).