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

Re: Changing mintty background color based on directory?



On 14 March 2012 19:25, reckoner <reckoner@xxxxxxxxx> wrote:
> Hi,
>
> I am using zsh (version 4.3.10) on cygwin with mintty as the terminal. Is it
> possible to change the background color of mintty when I change directories?
> One can change the colors in mintty on the fly by sending escape sequences
> as described here:
>
> http://code.google.com/p/mintty/wiki/Tips#Changing_colours
>
> I just don't know how to get this to work w/ zsh as the directory is
> changed.

The chpwd() function is called by zsh every time the current directory
changes, and all functions listed in the chpwd_functions array (ie,
chpwd_functions=( myfoo_chpwd ) would make myfoo_chpwd be called too).

-- 
Mikael Magnusson



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