git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t0005-signals.sh fails with ksh

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 9, 2015, 20:01 UTC
Message-ID
<20150509200104.GB225482@vauxhall.crustytoothpaste.net>
In-Reply-To
<20150508212146.GA16614@peff.net>
On Fri, May 08, 2015 at 05:21:47PM -0400, Jeff King wrote:
Show 17 quoted lines
> On Fri, May 08, 2015 at 02:16:19PM -0700, Junio C Hamano wrote:
> > I wonder if zsh is in the same league.  Do we support people who do
> > SHELL_PATH=/bin/zsh and bend over backwards when it breaks?
> 
> I tried "make SHELL_PATH=zsh test", but had trouble seeing the test
> output for all of the errors being spewed to stderr. ;)
> 
> Certainly this:
> 
>   $ zsh ./t0000-basic.sh -v -i
>   > [...]
>   test_cmp:1: command not found: diff -u
>   not ok 4 - pretend we have a fully passing test suite
> 
> is not especially encouraging (it looks like running "$FOO bar" does not
> word-split $FOO). I am not a zsh user, though, so there may be ways to
> convince it to be more POSIX-y (e.g., just calling it as "sh").

I use zsh. It's possible to convince it to be more POSIXy by saying "emulate sh" or invoking it via a symlink called sh. However, having said that, I don't recommend it. I set /bin/sh to zsh on my Debian system and a lot of things broke. Early versions of Mac OS X did that, too, and they stopped because it was very broken.

As for ksh, I don't know whether you want to kill support for just ksh93 or mksh as well. I've generally had good experience with mksh as /bin/sh when I've tried it, and it's at least semi-supported in Debian because it meets Debian's POSIX-plus requirements.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Jeff KingNext: evgeny
Message 10 of 11 in “t0005-signals.sh fails with ksh”
  1. evgenyMay 8, 2015
  2. Junio C HamanoMay 8, 2015
  3. Jeff KingMay 8, 2015
  4. Jeff KingMay 8, 2015
  5. Junio C HamanoMay 8, 2015
  6. evgenyMay 8, 2015
  7. Andreas SchwabMay 9, 2015
  8. Junio C HamanoMay 8, 2015
  9. Jeff KingMay 8, 2015
  10. brian m. carlsonMay 9, 2015
  11. evgenyMay 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.