9 ms·
Nushell: Introduction to a new kind of shell
- Ygg2 4y agoNushell is PowerShell done right.
- vips7L 4y agoIt felt less powerful than PowerShell to me, and didn’t feel like it brought anything different to the table that would warrant me to switch. It also has far less tooling and plugin support.
- nostoc 4y agoPowershell is powerful because of the deep integration with the .NET ecosystem, and by extension, the OS. This new shell lacks that, I agree. But I think it's a way harder problem to solve on linux.
- subjectsigma 4y agoIDK, my first reaction was that it was PowerShell except worse.
- majkinetor 4y agoYeah, lets live in holywood movies where decades old project is replaced overnight with right solution :)
- alkonaut 4y agoWhat are the features that are done differently, or in other words, why would I choose Nushell over PowerShell?
- majkinetor 4y agoYou don't. The good thing is you have alternative in case you need it. Performance might be different in specific case.
- Semaphor 4y agoWell, they were replying to a post that said this is powershell done right. Seems very relevant to ask what the done right part is.
- majkinetor 4y agoAnybody can say anything, that doesnt mean it should be taken seriously. "Done right" is probably that it is not done by MS and that it is developed in Rust. That ignores universe of other aspects.
- Semaphor 4y agoYes, let's go with your guess instead of trying to get an answer.
- majkinetor 4y agoIndeed :) I have seen them all (answers).
- Ygg2 4y agoError messages are great, autocomplete works out of the box, and commands ArentCamelCaseMonstrocitiesOnlyMicrosoft --CouldLove.
- delta_p_delta_x 4y ago> ArentCamelCaseMonstrocitiesOnlyMicrosoft --CouldLove Personally, CamelCase makes more sense than everythinglowercasesmushedinto -onetwothreefourparametersSometimesCapitalised and --sometimesdoubledashed and -Isometimesspacedoesn'tmatter -and --sometimes - "dashlivesalone" --AND -o -- "twodasheslivealone".
- jborean93 4y ago> autocomplete works out of the box > Error messages are great Some improvements in pwsh would be nice here I agree but they have moved away from the more verbose error messages to a more concise view. I personally prefer if there was something like Python 3.11's new error message in PowerShell. > autocomplete works out of the bo Not sure what you mean, autocomplete works out of the box with PowerShell as well. It can even auto complete object properties and methods. You can also adjust the auto completion method to be like the shell you desire; i.e. bash/zsh modes. > and commands ArentCamelCaseMonstrocitiesOnlyMicrosoft --CouldLove Sure builtin ones are the `Verb-Noun` syntax but you don't need to follow this if you don't want. You can certainly use snake_case if that's your personal preference.
- ripley12 4y agoI'm one of the Nushell developers, and one of the main reasons I joined the project was that I couldn't find a cross-platform shell I was happy with. PowerShell has a _lot_ of baggage. I don't like a lot of their design decisions (ex: the super verbose naming, the continue-on-error default that makes scripting a pain), and it's unlikely that those decisions will ever be revisited. I tried pretty seriously to use PowerShell as my daily driver on Linux and macOS 2 years ago and was disappointed. Too many rough edges and Windows-first features. PowerShell's startup performance is also pretty rough; I was seeing startup times around 2s after some minor profile customization. I think Nushell addresses all of those points well; it's got nice concise syntax, solid support for Mac/Windows/Linux, and instant startup times. On the other hand, Nushell's less polished+stable than PowerShell; we're still making breaking changes to the syntax+commands.
- alkonaut 4y ago> the super verbose naming Isn’t long names but short aliases the pragmatic way of solving the naming problem? “ls” or “dir” is perfect when typing interactive but in a long program I don’t mind typing something longer out. Startup perf is definitely an issue but otoh that doesn’t feel like a design decision that couldn’t be fixed.
- ripley12 4y agoBut then you have 2 names to remember. PowerShell's approach to naming is divisive. I'm not saying it's objectively bad, but I'm in the camp that doesn't like it.
- xamde 4y agoShould have been called nutshell
- kevsim 4y agoThat's what I read it as and was a bit disappointed when it turned out not to be the case.
- o_1 4y agosame
- RedlineTriad 4y agoNushell has the huge advantage of being searchable, which I think is really important for new projects where you need to look up docs often. It is cumbersome to always add a postfix: rust (lang), go (lang), etc...
- agumonkey 4y agoLooks pretty pragmatic and readable
- _dhruva 4y agoI thought the original Nushell was written by Jonathan Turner. Is this different? Some attribution in the article would help. (Thanks for pointing, there are links to original in the article) https://www.nushell.sh/ https://www.nushell.sh/
- afranchuk 4y agoIt doesn't seem so. While not immediately clear, this article doesn't seem to be claiming ownership of the project. It is a third-party review/introduction. They link to the project after the first section.
- jamincan 4y agoI get the impression that she packaged it for OpenBSD and wrote this as an intro to the shell for others. The 'written by Solene' bit reads initially as though she's claiming to have written Nushell, but when reading the text, it's pretty clear she didn't: > With nushell, it feels like I finally have a better tool to create more reliable, robust, portable and faster command pipelines. The learning curve didn't feel too hard, but maybe it's because I'm already used to functional programming.
- wodenokoto 4y ago> I packaged it for OpenBSD, so it's available on -current (and will be in releases after 7.3 is out), the port could be used on 7.2 with no effort. I think this is what makes it sound like the author of the article is the author of nushell. My first reading led me to believe the same, but she is "only" responsible for the OpenBSD package.
- solene 4y agooh, I'm indeed not the author of nushell, I'll try to make it more clear!
- asicsp 4y agoPrevious discussions about Nushell (https://hn.algolia.com/?q=Nushell https://hn.algolia.com/?q=Nushell), for example: https://news.ycombinator.com/item?id=27525031 https://news.ycombinator.com/item?id=27525031 (763 points | 1 year ago | 398 comments) https://news.ycombinator.com/item?id=20783006 https://news.ycombinator.com/item?id=20783006 (1477 points | 3 years ago | 366 comments)
- dang 4y agoThanks! Macroexpanded: Nushell 0.60 Released - https://news.ycombinator.com/item?id=30772042 https://news.ycombinator.com/item?id=30772042 - March 2022 (40 comments) Nushell: A New Kind of Shell - https://news.ycombinator.com/item?id=30718349 https://news.ycombinator.com/item?id=30718349 - March 2022 (8 comments) Nushell – a new type of shell written in Rust - https://news.ycombinator.com/item?id=28968966 https://news.ycombinator.com/item?id=28968966 - Oct 2021 (3 comments) Nushell 0.38 - https://news.ycombinator.com/item?id=28841901 https://news.ycombinator.com/item?id=28841901 - Oct 2021 (1 comment) GitHub – nushell/nushell: A new type of shell - https://news.ycombinator.com/item?id=27525031 https://news.ycombinator.com/item?id=27525031 - June 2021 (398 comments) Nushell: A New Type of Shell - https://news.ycombinator.com/item?id=26712741 https://news.ycombinator.com/item?id=26712741 - April 2021 (2 comments) Cbsh – a couchbase shell in rust on top of nushell - https://news.ycombinator.com/item?id=24767244 https://news.ycombinator.com/item?id=24767244 - Oct 2020 (4 comments) One Year of Nushell - https://news.ycombinator.com/item?id=24259914 https://news.ycombinator.com/item?id=24259914 - Aug 2020 (47 comments) Nushell – A New Type of Shell - https://news.ycombinator.com/item?id=22880320 https://news.ycombinator.com/item?id=22880320 - April 2020 (37 comments) Nushell – a modern shell written in Rust - https://news.ycombinator.com/item?id=20845584 https://news.ycombinator.com/item?id=20845584 - Aug 2019 (4 comments) Introducing nushell - https://news.ycombinator.com/item?id=20783006 https://news.ycombinator.com/item?id=20783006 - Aug 2019 (366 comments)
- teilo 4y agoHow did I not know about this? I will never parse text in Bash again.
- ratboy666 4y agoBut... Bash (sh) is not meant to parse text! Bash (sh) is glue. awk can parse text. As can SNOBOL4 if you REALLY want to go crazy. Or sed. Math is done by expr, dc and bc.
- siph 4y ago'In a way, Nu is a way of saying “what if we didn’t need tools like awk so often?” Since you’re working with structured data, as we add more support for file types, it’s less often you need to reach for “awk”, “jq”, “grep”, and the array of other tools to open and work with common file types.' From this interview: https://www.notamonadtutorial.com/nushell-the-shell-where-traditional-unix-meets-modern-development-written-in-rust/ https://www.notamonadtutorial.com/nushell-the-shell-where-tr...
- cyber_kinetist 4y agoI use it as my primary driver, for the sole reason is that it's the only cross-platform shell that properly supports Windows (without resorting to Cygwin/MSYS, which has performance issues and many pain points). I'm still getting used to the syntax though... (Edit: forgot to mention Powershell, since nowadays it also works on Macs and Linux)
- actually_a_dog 4y agoI'm curious what you mean by "properly supports Windows." Are you on a version of Windows that supports WSL2 (Windows Subsystem for Linux)?
- pletnes 4y agoWSL is great but it’s basically a convenient VM. It’s no longer windows, as far as I’m concerned.
- sixothree 4y agoIt's literally a subsystem. It's integrated in many ways you would not use to describe a "VM". I don't understand the aversion nor the confusion.
- Semaphor 4y agoI thought since WSL2 it’s just a Hyper-V VM with some nice upfront configuration (like mounting all windows disks)?
- sixothree 4y agoI'm pretty sure Windows itself, as in your desktop, runs virtualized under many circumstances; and nobody seems to complain about Hyper-V then. And to be clear, WSL2 is very much integrated into windows via the filesystem and networking. I like to think of the networking more akin to docker than anything else.
- dloss 4y agoIts dataframe support (based on Apache Arrow and the Polars Rust library) looks very interesting. https://www.nushell.sh/book/dataframes.html https://www.nushell.sh/book/dataframes.html
- zozbot234 4y agoYes, it really should be called Polarshell.
- WastingMyTime89 4y agoShould probably be switched to the official project page rather than a subpage on an unrelated party website: https://www.nushell.sh/ https://www.nushell.sh/ It’s a lot better at introducing Nushell and feels like a proper landing page.
- libria 4y agoThese are 2 different types of posts. 1. A new product 2. An independent party's pro/con opinions about that product This thread is about #2. If you feel #1 has value on its own, post that. Read both your link and the OP's. While the topic is the same, the content is markedly different.
- wkdneidbwf 4y agohaha, thanks for this. i was looking at the examples on the other page and was like, "jfc, no thanks"
- eatonphil 4y agoIt's someone's personal blog post. No need to be mean. The styles are a little brutalist but also readable to me.
- wkdneidbwf 4y agoi wasnt talking about the css… i mistook the blog for the an official introduction and was turned off by the complexity of the examples. which i stand by—that’s a poor introduction to the shell.
- deleted 4y ago[deleted]
- eatonphil 4y agoSo HN is not supposed to allow blog posts about projects but must always swap out for the project site itself? As someone who writes blog posts about projects, I hope not! It's not like this blog post is affiliate spam.
- DeathArrow 4y ago>This is just an example from YAML to JSON, but you can convert much more formats into other formats. >open dev/home-impermanence/tests/impermanence.yml | to json I can do it with PowerShell: $os_list = (Get-Content -Path "C:\temp\operating-systems.yml" | ConvertFrom-Yaml) Set-Content -Path "C:\temp\PowerShell_operating-systems.json" -Value ($os_list | ConvertTo-Json)
- vips7L 4y agoProbably better to write this with the standard alias's so people don't complain about verbosity: gc ./something.yml | ConvertFrom-Yaml | ConvertTo-Json > /some/file.json Also I don't think ConvertFrom-Yaml actually exists as a standard cmdlet.
- ac130kz 4y agoPowershell is also quite anti-semantic, non-portable and verbose
- delta_p_delta_x 4y ago> anti-semantic Why? > non-portable PowerShell 6 and later run on Windows, macOS, and Linux. > verbose This is by design.
- ac130kz 4y ago>Why? Case insensitive, weird parameter passing, no Posix-like interface. >Windows, macOS, and Linux Yet it is still mostly suitable for Windows, where it makes sense with weird (read: mostly bad and outdated) platform-wide proprietary decisions. >This is by design Well, humans should not spend too much focus on verbosity, maybe I'm wrong, at least that's what I've learnt from a university HCI course.
- vips7L 4y ago> Case insensitive, weird parameter passing, no Posix-like interface Parameters are passed like any other shell? > Well, humans should not spend too much focus on verbosity, maybe I'm wrong, at least that's what I've learnt from a university HCI course. While its by design everything comes aliased and arguments are fuzzy matched. As a human you don't need to spend time on verbosity if you don't want to. For example: Remove-Item $directory -Recurse -Force rm $directory -r -fo
- deleted 4y ago[deleted]
- photochemsyn 4y agoIt'd be useful if there was some site detailing and benchmarking the size, overhead, performance etc. of the various popular shells on different systems. This looks interesting but the binaries seem rather large relative to bash. For example, what do the developers view as the minimal system parameters needed to avoid annoying latency?
- stoplying1 4y agoI just ported a bunch of scripts to nushell. I hit some bugs, a couple of which are a bit sharp, but wow, the list of quirks I have to remember for nutshell are so much fewer than for bash. Constantly impressed at the errors it catches at parse time, kinda crazy sometimes. Oh my god I could cry, strings are sane to work with. I may never write a bash script again (it's okay, I use Nix so I get nushell everywhere I'm might need it, for free) Everyone is asking about PowerShell. I never hated it, but lord it makes some awful, stupid infuriating decisions. I've lost hair and sanity to some stupid list/single-item-list beahvior. Numerous operators and bits of syntax are just different. Everything about the script syntax is just slight odd and confusing. There's basically none of this with nushell. Jonathan Turner is a gifted person with an eye for language design and it really shows. Edit: I do think it's missing some important output redirection functionality. You can workaround by using "complete" but that feels non-ideal.
- fragmede 4y ago> strings are sane to work with Okay, I'll bite - how does it handle filenames with spaces and newlines in them? I have a strong case of Stockholm syndrome with bash because I figured out how to deal with the first one, but I'd love a system that deals with that sanely.
- mustache_kimono 4y ago> I may never write a bash script again I wrote 2x 200 line-ish shell scripts recently, and it was simply terrible, and although I'm increasingly convinced we need a shell like abstraction, I can't believe `bash` is the best we can do. Really hope I find one of these alt shells that suits me. Not a fan of Python but xonsh looks really cool too.
- Test0129 4y ago> In a nutshell, nushell is non-POSIX shell, so most of your regular shells knowledge (zsh, bash, ksh, etc…) can't be applied on it, and using it feels like doing functional programming. Is there a reason some shells like fish (and now nushell) are non-POSIX? What is the benefit? I really like fish but I've kept away from it because it's non-POSIX and won't necessarily play well with years of POSIX scripts and knowledge I have.
- eatonphil 4y agoIs there a reason every PL designer in the world didn't just make a new implementation of Pascal rather than design Python or Java or Rust? :)
- d4mi3n 4y agoCorrect me if I’m wrong, but doesn’t POSIX dictate a text stream as STDIN/STDOUT? If my understanding is correct, this basically rules out any attempts to create richer CLI pipelines that necessitate other kinds of data interchange. IIRC this was one of the motivating factors in the design of PowerShell—though I don’t know PS well enough to say if it’s POSIX complaint or not.
- dec0dedab0de 4y agoIs there a reason some shells like fish (and now nushell) are non-POSIX? Some things are different than other things. It's the same reason that not all desserts are pie, and not all automobiles are trucks.
- sigzero 4y agoThe output being in tables is nice and being able to act on it as a table is also pretty nice. At first glance, it seems it's well documented as well. I don't know that I would switch but I'll definitely read up on it.
- mrtweetyhack 4y agoDo we need a new shell or a few utilities that help produce structured output? For example, `ls | gen_structure | limit 50 | head 5`
- forgotpwd16 4y agoThat's an interesting project to attempt. An issue that should be considered is that pipes can only pass plain text. So every command should import/export structured text which may impact performance and limit capabilities when compared to a shell that can pipe objects.
- csdvrx 4y agoThe structure can be done with ASCII: csv and tsv manage to pass data in plain text (the later while remaining readable) Relational data would have the extra advantage over json-like property-based data of being both easier to present on screen (tables) and to interact with (SQL like: where + order + limit would cover most usecases)
- geophile 4y agoEww. This is basically screen-scraping command output to enable structure-oriented commands. That means you need a scraper for every output, the scrapers need to be aware of all the options, handle filenames with whitespace correctly (not sure that's even possible in general). And once you've done that, you have this new batch of commands that are structure-oriented, so you are using bash (for example) as a boot loader for your new shell. Why not just use the new shell? I have a project in this space: https://marceltheshell.org https://marceltheshell.org. It is based on Python, so Python values (strings, numbers, tuples, lists, etc.) are piped between commands. No sublanguages (as in awk); instead you write Python functions. Marcel has an ls command, but instead of producing a list of strings, it generates a stream of File objects which can be piped downstream to other commands that operate on Files. Example: sum of file sizes under directory foobar: ls -f foobar | (f: f.size) | red + -f means files only. In parens is a Python function (you can omit "lambda") that maps a file to its size. red + means reduce using addition, i.e., add up all the file sizes. Or to compute size by file extension: ls -f foobar | (f: (f.suffix, f.size)) | red . + f.suffix is the extension. "red . +" means to group by the first field of the tuple (the extension) and add up the sizes within each group.
- commitpizza 4y agoSeems like a missed naming opportunity, it should've been "Nutshell" :D
- norman784 4y agoOne issue I have with nushell is that on macOS they use the `Library/Application Support` path for the config instead of the `.config` making it awkward, their reason is that the former is the correct path of application data, while none of the other CLI apps I use do this, every other app just points to the `$HOME` dir or `.config` dir. I used it for a while but I switched back to zsh, maybe in the future when it has a stable release I try it again, was too much hassle to update the config on almost each release. Also didn't worked well with some utils I use that has specific initialisation for each shell (i.e. rbenv). Otherwise nushell seems to be a good contender for an alternative shell.
- 130e13a 4y agosurely something as basic as the location of the config folder can somehow be changed to a custom path, right?
- radlad 4y agoConfiguring where configuration data lives can be tricky. (Chicken/egg problem.) But you can certainly create your own symlink.
- norman784 4y agoYeah, the issue is mainly if you setup a new machine with your dot files, you need to remember to setup the symlink, because you don't do that so often is so easy to forgot. Also I pointed that out because I share my dot files between Mac and Linux and that's certainly annoying to have two paths for both.
- pie_flavor 4y agoit is the correct path for application data. Configs go in ~/.config on Linux, ~/Library/Application Support on Mac, and ~\AppData\Roaming on Windows; some other tools doing the wrong thing isn't a reason for nushell to do the wrong thing, and your preference for nushell doing the wrong thing shouldn't mean I have to suffer it. If you want it to be visible in your home dir, you can easily put a symlink there.
- blahgeek 4y agoI still believes that [xonsh](https://xon.sh/ https://xon.sh/) is the best of its kind because I do not want to remember yet another language syntax
- gatane 4y agoIs there something like this but with Lua?
- forgotpwd16 4y agoThere was an attempt: http://lua-users.org/wiki/LuaShell http://lua-users.org/wiki/LuaShell
- drey08 4y agoIt looks promising, but why does it flicker every time I input a key? Using WSL & Terminal.
- yewenjie 4y agoHas anybody switched to any newer shell from Fish?
- anentropic 4y agoSpeaking of non-POSIX shells, I stumbled upon this last week: https://github.com/letoram/cat9 https://github.com/letoram/cat9 https://arcan-fe.com/2022/10/15/whipping-up-a-new-shell-lashcat9/ https://arcan-fe.com/2022/10/15/whipping-up-a-new-shell-lash...
- gg-klotho 4y agoI tried nushell for a few days, but sh syntax is just too ingrained... It slowed me down a bunch and couldn't get over the initial learning curve. Ended up going back to zsh. Also, losing a bunch of completions for tools I used was a bummer. I wish nushell could parse bash/zsh completion scripts or something to help ease the transition. Maybe I'll revisit it at some point in the future.
- kibwen 4y agoIt took me about a decade after fish came out for me to finally switch from bash. Nu looks like an improvement over fish, but I expect it will also take me about a decade to bite the bullet and use it. :P
- acedTrex 4y agoI would kill for a different shell language but im so deep into ohmyzsh its hard to switch
- otikik 4y agoCalling things “new something” is usually a bad idea. It might be new now, but it won’t stay new for long. And then it becomes a lie. “Newcastle”, “Newport”, “The New iPad”(which was later renamed to a much more logical 3.0)
- ElijahLynn 4y agoA comparison to fish (shell) would be useful too.
- deleted 4y ago[deleted]
- bsdetector 4y agoHaving written a lot of shell scripts, the single greatest thing I've ever experienced is shell-friendly outputs. For example, consider if ls had a "--shell" option that output each entry as a single line of shell-quoted variables safe for eval: # cd /usr/share/dict # ls --shell words path="/usr/share/dict" file="words" user="root" group="root" size=985084 ... Then all sorts of things become easy. # eval $(ls --shell words); echo "$size" "$file" This nushell doesn't really change anything important about this biggest scripting problem. You're still parsing human readable output and it's still dependent on particular versions and options passed. If I had a genie wish of nushell being installed everywhere or even just coreutils having a --shell option I'd take the latter any day.
- d33 4y agoI like the idea, but if it was interpreted directly, that would be a security nightmare unless we also had something like Python's ast.literal_eval(). Which makes us come back to JSON-like outputs because we need some form of serialization anyway, I guess.
- bsdetector 4y agoOf course there could be some tweaks like a scoped eval to prevent stomping on the script's variables, but it's really not very hard for a C program to escape shell variables correctly and safely. You could have an eval that only read variables, but trusting a program to only return variables is a really low bar; it's very hard to mess that up.
- exyi 4y agoMany tools have some switch which will make them output JSON, which is easy to process if you have jq. For example `docker something --format='{{json .}}'`.
- dkarl 4y agojc [0] is dedicated to providing this externally for common commands, but I agree that it would be better if command authors built it in as an option. It would make shell scripts shorter, more readable, and less buggy. [0] https://github.com/kellyjonbrazil/jc https://github.com/kellyjonbrazil/jc
- raydiatian 4y ago“Ask and ye shell receive”: I swear I was just complaining about bash, zsh and the lot the other day saying that we needed a modern alternative shell without ridiculous names and design choices. Installing this tonight! So excited!
- ripley12 4y agoHope you enjoy it! The Nushell Discord is pretty active if you have any questions: https://discord.gg/NtAbbGn https://discord.gg/NtAbbGn
- mastax 4y agoI used nushell's data frame support a year ago to do some data munging. It was a pretty pleasant experience. That was before I learned pandas, though, so I don't know if I'd reach for it again.
- the__alchemist 4y agoDoes anyone have an ELI5 for what this, BASH, ZSH, Powershell etc do? It seems it's a conflation of #1: A CLI. #2: A specialized programming language that mainly does file-system operations. Is there a compelling reason to use something like this (or Powershell's scripting system, from the comments here), vice Python or Rust's etc standard library filesystem tools? Context: I use Windows Terminal with embedded powershell on Windows, and Terminal on Linux. Useful for compiling programs, running Python scripts, and executing CLI-based programs (eg clippy, ipython, rust, various programming-language-specific formatters etc, some CLI-based text editors like VIM). Also, troubleshooting Linux problems.
- raydiatian 4y agoA shell is pretty much what you described. More accurately it’s a program for interacting with the operating system, and it usually ships with a scripting language, and Utility programs. Hence the conflation. If you’re using Windows Terminal, you’re using a sort of predecessor to Powershell (somebody please correct me on this), if you’re using terminal on Linux, you’re most likely using bash. Enter ps -p $$ at your Linux terminal to find out (which shell you’re using). > Useful for compiling programs, running Python scripts, and executing CLI-based programs Yeah, so from here, it’s possible to automate those commands, if you wanted to. In windows you’re talking about .Bat or .Ps1 files. Shells are the language you use to write those scripts, and they typically ship with access to some useful (file/text oriented) commands. The only problem is these shells were invented in the 80s 90s, and have awful conventions that make some people miserable enough that they go and write a new shell that tosses previous conventions out the window. And IMO they did a great job.
- the__alchemist 4y agoAppreciate those details! And as ripley said, Windows Terminal is a housing for other terminals like Powershell or various WSL OSes, but has tabs.
- ripley12 4y ago> If you’re using Windows Terminal, you’re using a sort of predecessor to Powershell (somebody please correct me on this) Not necessarily. Windows Terminal is just a terminal emulator; you can run any shell in it: cmd.exe, PowerShell, Nushell, bash, fish...
- dexterH 4y agofinally. a unix powershell. everything is an object.
- TheLocehiliosan 4y agoJust was trying it. A couple minutes in, I discovered it doesn't support suspended jobs. :( seems like that would be a very basic feature. https://github.com/nushell/nushell/issues/1329 https://github.com/nushell/nushell/issues/1329 https://github.com/nushell/nushell/issues/1796 https://github.com/nushell/nushell/issues/1796 https://github.com/nushell/nushell/discussions/5239 https://github.com/nushell/nushell/discussions/5239
- Myrmornis 4y agoI also use tmux for this. Personally, since starting to use tmux years ago, I've never even thought of wanting job control in an interactive shell process.
- SighMagi 4y agoIn the past, I've toured these alternate, non-POSIX shells like Nushell. A lot of them (e.g. Powershell, Elvish) don't provide job control. I looked into how job control works and it's kind of a bother, so I see why they might have elided it. I wonder if multiplexing the terminal using tmux or screen is a good enough alternative the job control for many use-cases. You do lose state (i.e. environment variables, working directory), but if all you want to do is run something else maybe it's good enough. I personally haven't tried living without job control though.
- parhamn 4y agoMy data point: I prefer tmux/multiplexing over job control because the process hierarchy leads me to managing them better (I never accidentally quit tmux). Also I don't have to worry about std stream usage. I'm actually not sure of a case I'd care for job control.
- yencabulator 4y agoThe problem with tmux is that I often start a long process without really realizing it, then control-Z bg to continue working with the shell. With tmux, I'd need to either realize up front I'm about to start a long-living thing, or lose the context of the current shell to continue my interactive work.
- zokier 4y agoPlease correct me if I'm wrong, but doesn't nushell suffer from the same problem as powershell that all the nice fancy stuff works only for in-process commands and external programs are bit of a second-class citizens? To me interesting question is that is it even possible to build rich strucure-aware shell-like cli environment that would allow seamless integration of external polyglot programs in the same vein as unix shells where only minimal amount of stuff is required to be builtins (/bin/[ is cute example). It is a difficult problem, at minimum probably requires all compatible software to be explicitly made so. But for best experience even the basic unix fundamental of stdin/stdout/stderr+argv/env might need re-evaluation.
- exyi 4y agonushell seems to have better way of parsing the string-only outputs of other commands. https://www.nushell.sh/book/commands/parse.html https://www.nushell.sh/book/commands/parse.html I don't know how to do a similar thing in powershell. > To me interesting question is that is it even possible to build rich strucure-aware shell-like cli environment that would allow seamless integration of external polyglot programs... Problem is that most of the classic Unix programs output in some messy format. It would be nice if we could agree that each command has --json flag (for example) which will make the output trivial to parse programmatically in any other advanced shell.
- ripley12 4y ago> nushell seems to have better way of parsing the string-only outputs of other commands. Yup. In addition to that `parse` command, Nu also has a suite of `from` commands that trivially convert other data formats to Nu tables. CSV, JSON, TOML, XML, YAML, and many more. So if you're working with a program that can emit, say, JSON, you just do `some_external_command | from json` and boom, you've got a Nu table.
- exyi 4y agoParsing JSON in powershell is not that bad either, `ConvertFrom-Json` pretty much does what you need. AFAIK there is nothing as convenient as nu's `parse`
- PointyFluff 4y agoI found Nushell to be too buggy for day to day use, but I sure am looking forward to the day it's stable!
- peter_d_sherman 4y agoNushell looks pretty good! But, how to automatically convert all existing shell scripts -- to Nushell? I think it would be highly interesting if someone created "an LLVM for shell scripts"... In other words -- given a shell script that runs on one shell, turn that into a parse tree -- then transpile that parse tree back into a script such that the transpiled script runs on a different shell -- with guaranteed full compatibility... Maybe some work in this area is being done, or already has been done... I'd be interested if anyone knew of anything like this... If so -- then links would be appreciated!