Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#537283: homing in
- X-seq: zsh-workers 27238
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#537283: homing in
- Date: Wed, 2 Sep 2009 15:00:00 +0000
- Cc: martin f krafft <madduck@xxxxxxxxxx>, 537283@xxxxxxxxxxxxxxx
- In-reply-to: <20090902070912.GA31041@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, martin f krafft <madduck@xxxxxxxxxx>, 537283@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20090902070912.GA31041@xxxxxxxxxxxxxxxxxxxxxxxxxx>
On Wed, Sep 02, 2009 at 09:09:12AM +0200, martin f krafft wrote:
> % precmd_test() { set -x; test -d . && echo . is a directory; set +x; }
> % precmd_functions=(precmd_test)
> +precmd_test:0> test -d .
> +precmd_test:0> echo . is a directory
> . is a directory
> +precmd_test:0> set +x
> % [PRESS CTRL-C]
> +precmd_test:0> test -d .
> precmd_test:test: argument expected
> +precmd_test:0> set +x
>
>
> The same happens with [ -d . ], but /usr/bin/test and /usr/bin/[
> work fine. Thus, there must be something fundamentally out of order
> with precmd functions and builtin tests which shows only when precmd
> functions are called without a preceding exec() by the shell.
> Running an external programme before the test from the precmd
> function (e.g. ls >/dev/null) does not work though.
>
> I can reproduce this with zsh -f.
This is the same with precmd()
Messages sorted by:
Reverse Date,
Date,
Thread,
Author