Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: chpwd() and completions functions
- X-seq: zsh-users 10548
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: chpwd() and completions functions
- Date: Mon, 24 Jul 2006 13:01:28 +0100
- In-reply-to: <20060724115117.GA8050@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060724115117.GA8050@xxxxxxxxxxxxxx>
Tobias Gruetzmacher wrote:
> I have a slight problem here: My chpwd() function is messing up some
> completions. For example, the darcs completion has:
>
> print $(cd $root; pwd -P)
>
> This triggers my chpwd() function, so the output ends up containing the
> stuff my chpwd() function is writing out, which makes the completion
> system break at this point. Any ides how to fix this problem?
The completion system closes stdin so that normal output doesn't
go to the terminal. You can detect this in your chpwd:
chpwd() {
if [[ -t 0 ]]; then
# stuff with normal terminal.
fi
}
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author