Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[schaefer@xxxxxxxxxxxxxxxxxxxxxxx: Re: How to exploit chpwd-function?]



Bart forgot to send his answer to this list, too:

Anyway, those ways to exploit chpwd sounds so cool that I think I'll
add some stuff of that kind to my shell-configs some day.

----- Forwarded message from Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> -----

From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
Message-Id: <1010419025502.ZM8775@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 02:55:01 +0000
In-Reply-To: <20010418192521.A20505@xxxxxxxxxxxxxxx>
References: <20010418192521.A20505@xxxxxxxxxxxxxxx>
To: Juhapekka Tolvanen <juhtolv@xxxxxxxxx>
Subject: Re: How to exploit chpwd-function?
Content-Length: 1349
Lines: 34

On Apr 18,  7:25pm, Juhapekka Tolvanen wrote:
} Subject: How to exploit chpwd-function?
}
} Need I say more? Would you please tell me your favourite ways to use
} chpwd-function.
} 
} P.S: I do not subscribe to this list, but I am smart enough to read
} mailing-list archives via WWW. You can Cc: to me, if I want.

A search on chpwd in the zsh-users archive gives 73 hits, covering only
three topics (aside from bug reports):

    using chpwd to set the xterm title (and similar stunts) [better done
    with precmd, but see also the zftp_chpwd function in the 3.1.9 and
    later zsh manual]; 

    using chpwd to save and load a per-directory zsh history;

    using chpwd to report whether the new $PWD is a symlink.

A search on zsh-workers turns up nothing else of interest.

In the past, I've used chpwd to check whether the .exrc file in the current
directory could safely be read and set EXINIT accordingly; but as I now use
emacs more often than vi, I've dropped that.

The only thing left in my chpwd function now is assigning cwd=$PWD, because
I first learned csh and still occasionally type $cwd by "mistake."

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


----- End forwarded message -----

-- 
Juhapekka "naula" Tolvanen * U of Jyväskylä * * juhtolv@xxxxxxxxx
http://www.st.jyu.fi/~juhtolv/spam.html * STRAIGHT BUT NOT NARROW
-----------------------------------------------------------------
"There's a new game we like to play, you see, a game with added
reality. You treat me like a dog. Get me down on my knees. We
call it 'Master and servant'."                       Depeche Mode



Messages sorted by: Reverse Date, Date, Thread, Author