Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: zsh breaks configure scripts
- X-seq: zsh-workers 16758
- From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "'Eric Norum'" <eric.norum@xxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: RE: zsh breaks configure scripts
- Date: Mon, 4 Mar 2002 18:19:31 +0300
- Importance: Normal
- In-reply-to: <5CD7CBD8-2F7F-11D6-9666-00039366A118@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
>
> Apple uses zsh as /bin/sh on Mac OS X. Unfortunately zsh has a
> `feature' that breaks many autoconf configure scripts. The scripts
> contain lines like:
> if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && .......
>
> The problem is that the zsh cd command insists on printing the
directory!
>
> The offending code is in cd_new_pwd() in Src/builtins.c around line
1047:
> if (unset(PUSHDSILENT) && func != BIN_CD && isset(INTERACTIVE))
> printdirstack();
> else if (doprintdir) {
> fprintdir(pwd, stdout);
> putchar('\n');
> }
>
> I suggest that the fprintdir/putchar be called only in interactive
> shells:
> if (unset(PUSHDSILENT) && func != BIN_CD && isset(INTERACTIVE))
> printdirstack();
> else if (doprintdir && isset(INTERACTIVE)) {
> fprintdir(pwd, stdout);
> putchar('\n');
> }
>
Looking at different shells here:
sh does not print anything at all
ksh and bash do not print anything is we cd relative to empty CDPATH
element (the best I can explain it):
bor@itsrm2% ksh
$ cd
$ CDPATH=:; cd tmp
$ cd
$ CDPATH=.:/tmp; cd tmp
/home/bor/tmp
$ cd
$ CDPATH=:/tmp;cd tmp
$ cd
$ CDPATH=/tmp:; cd tmp
$ exit
May be we should just follow the suite?
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author