The Bun Shell
bun.sh
The Bun Shell
1–10 of 239 posts
Re: The Bun Shell
#2Re: The Bun Shell
#3Another alternative is the ZX shell[2] JS library. Tho haven't tested it.
Re: The Bun Shell
#4Can somebody explain why they’re attributing ZSH to macOS? It’s clearly cross platform
But that also doesn't make much sense given that this is about non interactive scripts.
To be honest it's kind of crazy that for all the work that's gone into nodejs, it either doesn't have, or people don't know about, basic functionality that these examples are running a shell for.
Re: The Bun Shell
#5Can somebody explain why they’re attributing ZSH to macOS? It’s clearly cross platform
The only guess I have is because it's the default interactive shell on macOS, while bash is probably more common on GNU systems. But that also doesn't make much sense given that this is about non interactive scripts. To be honest it's kind of crazy that for all the work that's gone into nodejs, it either doesn't have, or people don't know about, basic functionality that these examples are running a shell for.
Is that fairly new? I thought the default shell was bash.
Re: The Bun Shell
#6Earlier quoted context omitted.
The only guess I have is because it's the default interactive shell on macOS, while bash is probably more common on GNU systems. But that also doesn't make much sense given that this is about non interactive scripts. To be honest it's kind of crazy that for all the work that's gone into nodejs, it either doesn't have, or people don't know about, basic functionality that these examples are running a shell for.
> default interactive shell Is that fairly new? I thought the default shell was bash.
Re: The Bun Shell
#7 functionName`param`
and whatever is inside of the upticks get sent to the function as an array. It's also what Bun is doing with it's $ (dollar sign) function for executing shell commands. There's so much weird syntax magic in JS.Re: The Bun Shell
#8I didn't know, but apparently you can execute a function in JS without parentheses using upticks (`), e.g: functionName`param` and whatever is inside of the upticks get sent to the function as an array. It's also what Bun is doing with it's $ (dollar sign) function for executing shell commands. There's so much weird syntax magic in JS.
Re: The Bun Shell
#9I didn't know, but apparently you can execute a function in JS without parentheses using upticks (`), e.g: functionName`param` and whatever is inside of the upticks get sent to the function as an array. It's also what Bun is doing with it's $ (dollar sign) function for executing shell commands. There's so much weird syntax magic in JS.
These are called "tagged templates": https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re: The Bun Shell
#10I'm wondering if it's picked up any ideas from oil shell [1].