Hacker News new | ask | show | jobs
by GregDavidson 495 days ago
bash, ksh, zsh and a few other shells have the awesome feature that if you call them with a link named "sh" they accept Posix Bourne-shell syntax.

This means you can make them your /bin/sh system shell which will be used to log you in and your login scripts can then set environment variables for your whole session. This feature is something I count on.

Some system shells (not dash) also allow login scripts to export essential shell functions to the session environment.

I would love to use a nicer shell, fish, oilsh, rc, etc. but it's gotta provide this key Posix compatibility. The Posix Bourne shell language is pretty simple. This is not a big ask.

1 comments

OSH behaves like that too -- it's POSIX and bash compatible

At some point I will update the home page to make that a bit more clear - https://oils.pub/

You just got a convert! Huge value in sh compatibility. Bash, not so much!