Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: More zsh tricks required please
- X-seq: zsh-users 7573
- From: Drew Perttula <drewp@xxxxxxxxxxxxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: More zsh tricks required please
- Date: Sun, 20 Jun 2004 17:38:47 -0700
- Cc: zsh-users@xxxxxxxxxx, drewp@xxxxxxxxxxxxxxxxxxxx
- In-reply-to: Message from zzapper <david@xxxxxxxxxx> of "Sat, 19 Jun 2004 13:43:46 BST." <vlc8d0toqggtc9gvlicp20ugllqlh0f7qa@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
> On the above BTW is it possible to do a
>
> > cd =some_script (doesn't work)
>
> to jump to the directory??
>
That works for me, thanks to this bit of .zshrc:
# cd to a file should take you to the dir that contains the file
# courtesy of Artur Penttinen <artur@xxxxxxxxxxx>
function cd () {
if [[ -f $1 ]]; then
builtin cd $1:h
else
builtin cd $1
fi
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author