nushell
ion
Our great sponsors
nushell | ion | |
---|---|---|
204 | 3 | |
26,603 | 1,394 | |
3.1% | 1.0% | |
6.1 | 0.0 | |
about 7 hours ago | 5 months ago | |
Rust | Rust | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nushell
-
jq 1.7 Released
Yeah agreed, especially now that PowerShell is available cross-platform.
Nushell[1] also seems like a promising alternative, but I haven’t had a chance to play with it yet.
-
The Case for Nushell
I also discovered an existing discussion[1] related to this topic which includes a link[2] to a "helper to call nushell nuon/json/yaml commands from bash/fish/zsh" and a comment[3] that the current nushell dev focus is "on getting the experience inside nushell right and [we] probably won't be able to dedicate design time to get the interface of native Nu commands with an outside POSIX shell right and stable.".
[0] https://gitlab.com/RancidBacon/notes_public/-/blob/main/note...
[1] "Expose some commands to external world #6554": https://github.com/nushell/nushell/issues/6554
[2] https://github.com/cruel-intentions/devshell-files/blob/mast...
[3] https://github.com/nushell/nushell/issues/6554#issuecomment-...
Today I learned (after disappearing down a rabbit hole after reading the linked article) that it's actually possible to begin to use & benefit from nushell's structured data pipe feature without changing one's current shell.
Structured data pipes have always been my primary reason for keeping an eye on nushell's development but after looking at the project's documentation again today it all still seemed "too much initial effort with uncertain outcome".
Because I don't want to switch my shell (not because bash is good but because it's not a priority to justify the expenditure of effort), I just want to have structured data in pipes within bash!
Turns out it's as easy as:
* nu --commands 'ls | where size > 1MiB'
(Where `nu` is the nushell binary being called from your existing shell prompt.)
Or, as more complete flow of data example:
* echo "[1,2,3]" | nu --stdin --commands 'from json | to json' | cat
Now you can fit nushell within your existing workflow where ever it's useful enough for you--without needing to commit to changing your entire shell.
(And this isn't the only or necessarily the best way to arrange things for the communication with bash--there's "^" & "externals" & "command signatures" & "from ssv" etc too.)
And nushell does have some nifty tools such as `explore` with `:try` to interactively build a processing pipeline.
But this information doesn't seem to be documented anywhere in the "book" or other introductory material. It only seems to be documented in the help message of the `nu` binary--which I almost didn't even get as far downloading today.
But then I found the help text in the source, so decided to try it again: https://github.com/nushell/nushell/blob/fd4ba0443d01e67f6304...
If the structured data pipes is one of the main appeals for you, maybe try this approach out?
I appreciate what projects like Nushell and Murex are trying to address, but having a saner scripting language and passing structured data in pipelines is not worth the drawbacks for me.
For one, Bash scripting is not so bad if you set some sane defaults and use ShellCheck. Sure, it has its quirks, but all languages do. Even so, the same golden rule applies: use a "real" programming language if your problem exceeds a certain level of complexity. This is relative and will depend on your discomfort threshold, but using the right tool for the job is always a good practice. No matter how good the shell language is, I would hesitate to write and maintain a complex project in it.
And for general QoL improvements with interactive use, Zsh is a fine shell, while still being POSIX compatible.
[1]: https://github.com/nushell/nushell/blob/main/crates/nu-comma...
-
Simple PowerShell things allowing you to dig a bit deeper than usual
I found nushell (https://www.nushell.sh) to be an impressive replacement "bash" for Windows
In terms of philosophy, think "Powershell but actually intuitive" : Every data is structured but command names are what you expect them to be. I usually don't even need to look at the documentation.
I liked it so much that I also replaced my shell on Linux with it, so I have the same terminal experience across all OSes
- GNU Parallel, where have you been all my life?
-
Crystal 1.9.1 Is Released
I like Powershell but IMO it still has too many fundamental Microsoftisms for it to be practical on Unix systems.
I would opt for Nushell instead: https://www.nushell.sh/
-
Dt: Duck tape for your Unix pipes
There's a lot of people trying to copy this to the Linux space. NuShell comes to mind: https://www.nushell.sh/
I had an idea where I'd make wrappers for all the popular commands that would accept JSON structured data instead of raw binary data and "do the right thing". And that way you could take advantage of it without having to change your shell tooling. And they'd all accept an extra argument called either --structured-out or --unstructured-out which would either emit JSON or render the output back to a "flat" string, as appropriate.
-
What languages have the best error message rendering styles in the terminal?
And while I have never personally used it, Nushell has the prettiest error message I've ever seen.
-
Mnemos moment: Search for a Shell
I contributed to dune shell a few years ago, until the author decided to stop working on it. Unfortunately it never went beyond the "hobby phase". A more mature shell written in Rust is nushell, but it's pretty large, so it might be difficult to port to another OS. There's also ion (part of Redox OS), which is much smaller, and hopefully easier to port.
ion
-
Is it true that most web developers use Linux and that's what you use at your job as a web developer?
Fish is deliberately not POSIX compliant and it's much nicer to use. Redox is going for UNIX compliance overall, but is deliberately being even less POSIX like than fish in their ion shell.
-
Nushell: A New Type of Shell
I've been looking for a new shell to test drive, seems like there are a lot of modernization that could be added by starting from scratch in the area. My daily driver Zsh hasn't changed for a long time.
Also have had my eye on ion[1] for a while, are there any other innovative shell projects out there?
What are some alternatives?
fish-shell - The user-friendly command line shell.
starship - ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
elvish - Elvish = Expressive Programming Language + Versatile Interactive Shell
PowerShell - PowerShell for every system!
alacritty - A cross-platform, OpenGL terminal emulator.
volta - Volta: JS Toolchains as Code. ⚡
xonsh - :shell: Python-powered, cross-platform, Unix-gazing shell.
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!
jq - Command-line JSON processor [Moved to: https://github.com/jqlang/jq]
nvim-nu - Basic editor support for the nushell language
zoxide - A smarter cd command. Supports all major shells.
leftwm - A tiling window manager for Adventurers