Live data from Hacker News

Nsh: A fish/bash-like Posix shell in Rust

github.com

1–10 of 56 posts

Re: Nsh: A fish/bash-like Posix shell in Rust

#3
Looks like the goal of this project is to be a replacement for bash with improved interactivity. That seems reasonable, compared to what you can do with zsh or fish bash is far behind concerning interactivity.

While I personally think shells that abandon POSIX/bash compliance are much more interesting as those can implement a sane scripting language, sticking with bash but improving interactivity is probably going to make more users happy as bash is so ubiquitous.

Re: Nsh: A fish/bash-like Posix shell in Rust

#4
post #3

Looks like the goal of this project is to be a replacement for bash with improved interactivity. That seems reasonable, compared to what you can do with zsh or fish bash is far behind concerning interactivity. While I personally think shells that abandon POSIX/bash compliance are much more interesting as those can implement a sane scripting language, sticking with bash but improving interactivity is probably going to…

> bash is far behind concerning interactivity.

Is it really? Projects like ble.sh [1] seem to pull off advanced features like syntax highlighting and enhanced completion with pure bash without the need for reimplementing a whole shell from the ground up.

1.: https://github.com/akinomyoga/ble.sh

Re: Nsh: A fish/bash-like Posix shell in Rust

#6
post #2

Very cool. I really love fish but sometimes find it very annoying to translate random posix snippets from the web.

The trick is to enter bash from fish, run your command, and then call fish again.

    (fish)$ bash
    (fish>bash)$ source ./random.sh
    (fish>bash)$ fish
    (fish>bash>fish)$

Re: Nsh: A fish/bash-like Posix shell in Rust

#7
post #6
post #2

Very cool. I really love fish but sometimes find it very annoying to translate random posix snippets from the web.

The trick is to enter bash from fish, run your command, and then call fish again. (fish)$ bash (fish>bash)$ source ./random.sh (fish>bash)$ fish (fish>bash>fish)$

I think you should hit ctrl+d when you are done in bash to avoid the nested fish>bash>fish.

Re: Nsh: A fish/bash-like Posix shell in Rust

#8
post #4
post #3

Looks like the goal of this project is to be a replacement for bash with improved interactivity. That seems reasonable, compared to what you can do with zsh or fish bash is far behind concerning interactivity. While I personally think shells that abandon POSIX/bash compliance are much more interesting as those can implement a sane scripting language, sticking with bash but improving interactivity is probably going to…

> bash is far behind concerning interactivity. Is it really? Projects like ble.sh [1] seem to pull off advanced features like syntax highlighting and enhanced completion with pure bash without the need for reimplementing a whole shell from the ground up. 1.: https://github.com/akinomyoga/ble.sh

Bash and Fish aren't written in Rust, so they'll be behind Nsh as long as they aren't written in Rust. /s

Re: Nsh: A fish/bash-like Posix shell in Rust

#9
post #6
post #2

Very cool. I really love fish but sometimes find it very annoying to translate random posix snippets from the web.

The trick is to enter bash from fish, run your command, and then call fish again. (fish)$ bash (fish>bash)$ source ./random.sh (fish>bash)$ fish (fish>bash>fish)$

Or just simply:

    (fish)$ bash -c ./random.sh

Re: Nsh: A fish/bash-like Posix shell in Rust

#10
post #6

Earlier quoted context omitted.

The trick is to enter bash from fish, run your command, and then call fish again. (fish)$ bash (fish>bash)$ source ./random.sh (fish>bash)$ fish (fish>bash>fish)$

Or just simply: (fish)$ bash -c ./random.sh

That doesn't give you the env vars that the script might have set.
Post reply on HN