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)$
I think you should hit ctrl+d when you are done in bash to avoid the nested fish>bash>fish.
Nsh: A fish/bash-like Posix shell in Rust
11–20 of 56 posts
Re: Nsh: A fish/bash-like Posix shell in Rust
#12Looks 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
#13Very cool. I really love fish but sometimes find it very annoying to translate random posix snippets from the web.
Re: Nsh: A fish/bash-like Posix shell in Rust
#14For anyone after an upgrade path from Bash/Zsh then Oil shell is a lot more mature: https://www.oilshell.org/
Re: Nsh: A fish/bash-like Posix shell in Rust
#15What does this really mean? Especially the ergonomic part?
Re: Nsh: A fish/bash-like Posix shell in Rust
#16Re: Nsh: A fish/bash-like Posix shell in Rust
#17Earlier quoted context omitted.
Or just simply: (fish)$ bash -c ./random.sh
That doesn't give you the env vars that the script might have set.
Re: Nsh: A fish/bash-like Posix shell in Rust
#18If features are integrated, then I would probably want to have something about error handling because it is difficult to get right in bash even with shellcheck¹ plus shellharden², and gets just worse when things run in parallel.
Re: Nsh: A fish/bash-like Posix shell in Rust
#19I applaud this project for bringing fish goodness to more people, although I don’t quite get why people cannot just learn fish. Fish is very simple. There is not that much to learn.
Maybe it matters if your write a lot of shell scripts but for anything complicated I use Julia, Python, Go or some other more proper language.
To me shells are mainly for interactive work and really simple scripts without control flow, beyond perhaps a for loop.
Re: Nsh: A fish/bash-like Posix shell in Rust
#20Very cool. I really love fish but sometimes find it very annoying to translate random posix snippets from the web.
I mainly use fish for interactive work not for programming. Then I use a real programming language.