Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: directory specific functions and aliases
- X-seq: zsh-users 19870
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: directory specific functions and aliases
- Date: Fri, 13 Feb 2015 23:17:42 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z4FijK0K1k223cDaHN6g0l1CoNgq387GFpbOUg/9B+4=; b=r3QlOjjUqjS0WlJJ2FcBJPiTWgQ+4a3JPNG5swX+kUBwleuzR3Vz+fzdW+og9GuvE5 xHpjD9o6yq4Eu+EuVkKLV6AhaeMv5Ny+dnuq/8ZLeR/PFofOWso2yGegh32Ai3qfXYzM +cn8pjAjLApSjOzK0gXaOTK5XU53R2iKHSLuvo6bbSX9j5NP9fTGXKIxfCbffd3+HtIN QripVBYDGLjJwoeV3eX5ft2Zz/gKd4JSaiquH45BYjda5c1YlvjBziqaN3ViPfaD2jJk 0uQWyuoiSgYM81oqQV64PkfDs7/DwMiw5HAWXS+bOspc5c1se8avtTRP+6NQBXNRYojS MqCg==
- In-reply-to: <20150213154138.118cf396@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAH_OBicY5yU-qWELH1Qd6Mx=KZfKdhgnoagA_TurjXo5sCAp5w@mail.gmail.com> <20150213154138.118cf396@pwslap01u.europe.root.pri>
On Fri, Feb 13, 2015 at 4:41 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On Fri, 13 Feb 2015 10:05:21 -0500
> shawn wilson <ag4ve.us@xxxxxxxxx> wrote:
>> What would be the best way to make functions that do different things
>> based on the directory I'm in - kinda like rvm does with rubies? I was
>> hoping for something cleaner than: case $(pwd) This is mainly because
>> I want to wrap cvs and rsync differently based on repo (and where
>> within that repo).
>
> I use a dot-file in the directory, but you need to be careful with this
> --- at least check you own the file before using it for extracting
> commands or anything of that kind.
I would check both the file and the containing directory; anyone can
create hardlinks to files you own in their own directories, and a
command that's safe in one directory may not be in another.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author