oilshell / oil

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

Home Page:http://www.oilshell.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[OSH] Bash incompatibility: `exec` does not accept `-a`

kseistrup opened this issue · comments

Oils v0.21.0 (commit cc2f683):

$ osh -c 'exec -a foo date'
  exec -a foo date
       ^~
[ -c flag ]:1: 'exec' doesn't accept flag -a

From man bash:

      exec [-cl] [-a name] [command [arguments]]
         ⋮
              an  empty environment.  If -a is supplied, the shell passes name
              as the zeroth argument to the executed command.  If command can‐

Bash scripts that use exec -a will fail.

Another bash incompatibility is the missing ulimit command (see #280).