Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The differences:

  * zsh has a ton of interactive chrome built-in, and a lot of it is on by default.
      This leads to some incompatibility with bash for scripting purposes
      the contextual completion stuff is infuriating when it's overly restrictive
  
  * A pure bourne shell (like dash) by nature doesn't support bashisms
      like $() as an alternative to ``
      On almost all gnu systems /bin/sh is a link to bash 
        which checks $0 and operates in sh mode
      Unfortunately bash's sh mode is completely broken
        it allows most bash-specific syntax
        so almost a lot of Linux users's #!/bin/sh scripts really need bash
The takeaway is that you should give up and use bash, or write your own shell if you're an asshole (I have done this).


Command substitution using $(...) is valid POSIX syntax, not a bashism.

   $ /bin/dash
   $ echo $(uname -r)
   2.6.31-rc7


or write your own shell if you're an asshole

Eshell.

It is nice to write "shell scripts" like "(loop for i in *.el do (byte-compile-file i))".




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: