3 ms·
How is nushell for interactive use? Prompt configuration, stuff like that? Also, how stable is it? Especially when interacting with weirder stuff like tmux, vi
by oblio 4y ago
How is nushell for interactive use? Prompt configuration, stuff like that?
Also, how stable is it? Especially when interacting with weirder stuff like tmux, vim, ncurses apps?
- ripley12 4y agoI would say interactive use is good. Not hard to configure prompts. Stability (in the sense of not crashing) is decent, it's been a long time since I've crashed Nushell. We do get the occasional crashing bug filed but most of those are in areas like our completion engine rather than interacting with external tools. OTOH, command design and language are not entirely stable; we are still pre-1.0 and we do make breaking changes fairly often. (I work on Nushell)
- oblio 4y ago> (I work on Nushell) Ooooh! Awesome! Thank you for your great work, I'd have 2 big questions: 1. Do you have any visibility into when things should stabilize enough for a 1.0 release? 1 year? 5 years? Impossible to say? 2. And the be-all-end-all of Linux distro packaging, Debian. Any plans to include it into Debian? Usually when this happens the package propagates to many, many downstream distributions, such as Ubuntu & family.
- ripley12 4y agoI'm not sure when we'll be ready for 1.0 (at which point we will commit to stability in the language etc.), but I would guess 1-2 years based on the work we want to do and the pace of contributions. Not sure about Debian. We generally rely on the community for distro packaging. Right now Homebrew is the easiest way to install Nu on most Linux distros.
- mkingston 4y agoThank you! I've been using Nushell for a couple of weeks and at this point I don't see myself going back. Modern configuration. Great interactive usage (structured data, mostly!). I thought I'd like it, but more so than expected so far. The one shortcoming I've encountered so far is that some built-in functions seem to buffer all their input before producing any output, meaning I can't e.g. tail + filter logs. A fairly simple example: journalctl -xefu systemd-networkd-wait-online.service | lines | filter {|in| $in =~ 'start'} only produces output when I interrupt (ctrl+c). Is this expected?
- ripley12 4y agoAhh, streaming. This is an area I've been working on; there are still lots of places where we collect data when we should stream it instead. In general, if you think "that should be able to stream" but it doesn't, that's probably a bug and worth filing an issue. I can reproduce your issue, I suspect that `filter` is collecting its input when it shouldn't. It's not totally clear why from looking at the code. If you can file an issue that would be appreciated, if not I'll try to do so later today. We have a tag for streaming issues: https://github.com/nushell/nushell/issues?q=is%3Aissue+is%3Aopen+label%3Astreaming https://github.com/nushell/nushell/issues?q=is%3Aissue+is%3A...
- mkingston 4y agoThanks for the reply. Upon further inspection, it looks like it's `lines`. It might also be `filter` but I haven't quickly come up with a way to determine whether that's the case. I opened an issue: https://github.com/nushell/nushell/issues/8016 https://github.com/nushell/nushell/issues/8016 I couldn't apply labels myself, I don't think.
- zioroboco 4y ago> How is nushell for interactive use? Prompt configuration, stuff like that? Prompt configuration is good... you define commands for the left and right prompt, as well as variables for vi mode indicators (the line editor's vi mode is mostly complete, I'm happy with it). You can also set the cursor shape based on vi mode. Also https://starship.rs https://starship.rs works well. There are hooks for running commands on events like changes to environment variables, which is how you implement support for things like version managers (i.e. on change to $PWD, run whatever). Nushell parses pipelines upfront, so the error messages are often very precise and useful, and arrive before any damage has been done. This is fundamentally different to how you might expect pipelines to work, so its difficult to compare like for like (... it's great, though). There's a built in fuzzy finder for commands, completions and history, as well as the line editor visually showing matches against partial commands (a trend which I think started with fish). I do miss some of the history search magic that's possible with zsh plugins — specifically using vi movements to incrementally match more of those visual completions from history. Completions for external programs have gotten good. If you set up carapace as a completion provider, then most things on the happy path work well (based on bash completions). Edge cases can be understandably buggy... I've noticed that completions for aliases are a bit unpredictable, but I haven't looked into it enough to know whether this is nushell or carapace. Finally, the automatic generation of help and completions for nushell commands (including your own custom commands) is excellent and one of my favourite features. I'd encourage anyone to look up the docs for custom commands. > Also, how stable is it? Especially when interacting with weirder stuff like tmux, vim, ncurses apps? I use tmux and vim, and I've had almost no issues. The only thing that comes to mind is the lack of job control, which means you need to remap ctrl-z to stop vim from getting into a weird state where it can't actually background itself. Another thing (which isn't nushell's fault at all) is if you change your default shell, many programs will expect that to correspond to a posix shell. For example, after changing my login shell I had to run around explicitly setting my shell to bash in a bunch of places, including vim. Also every now and then I'll find another oddball command that acts up. For example I noticed that `go test ./...` didn't work without quoting the (admittedly strange) `./...` argument. Later it started working without the quotes after a nushell update, but that's the kind of thing to watch out for. And another kind of stability: nushell has regular breaking changes. I think this is fine, because it's a fast-moving project which I'm only using locally, and this allows it to evolve quickly (I get excited to read the change notes). But this does make it harder for people who are trying to support nushell from their projects... and so I think naturally the responsibility to keep anything working has to lie with the user. If you are comfortable with that (which I am) then I think it's a good deal.