nuta / nsh

A command-line shell like fish, but POSIX compatible.
906 stars 34 forks source link

Missing POSIX (?) syntax #40

Closed ghost closed 2 years ago

ghost commented 2 years ago

Running Homebrew's shellenv script (necessary to use packages installed via Homebrew) by running

eval "$(/opt/homebrew/bin/brew shellenv)"

results in an error:

nsh: parse error:  --> 4:56
  |
4 | export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";␊
  |                                                        ^---
  |
  = expected param_op

Which corresponds to line 48 in the aforementioned script.

Is this POSIX-compliant syntax? If so, an implementation for this seems to be missing.

nuta commented 2 years ago

That's included in the POSIX spec. Will be fixed in nsh's (work-in-progress) next-gen parser.

ghost commented 2 years ago

That's included in the POSIX spec. Will be fixed in nsh's (work-in-progress) next-gen parser.

Is there a way to try this WIP version out? I checked out the seiya branch, but the only executable I seem to find is the one in src/nsh, and it looks pretty much empty.