@b0rk For #NuShell, the corresponding command would probably be
history | where command =~ '^(git\s+[^ ]*)' | uniq-by command -c | sort-by count -rn | each {|it| $"($it.count | fill -a r -w 7) ($it.value.command)"} | to text
Little project idea I've been hacking on: a dataflow language inspired by #nushell (syntax wise), with pipelines and stuff for image/video/audio processing, shaders, or whatever else you want
the problem is i have no idea how to do langdev lmao
i now have a logos based lexer and that's it lmfao
and i'm thinking to either just do whatever i want, aka not look up how to do shit properly (that hurts) or... idk actually, since i have no idea how to do shit properly and don't have the attention span to go through a langdev book lmao
also, little note here: #nushell is an amazing shell that's really intuitive and better then posix shells. i'm working on writing a few posts about it, that are designed to be entirely noob friendly to teach it to ppl who are interested
I think my next shell experiment is going to be oilshell. I don't expect it to differ too much from bash day to day. Nushell does some interesting stuff but I'm not sure it's quite what I want.
@arch I like the idea of #nushell but in practice it's really cumbersome to use from my experiences. It's hard to get to the place I actually want because there is no "How to navigate a big JSON object made of objects and arrays".
I've spent a couple of weeks using #nushell at work because I do (way too much) json and yaml fiddling in #kubernetes ( #openshift ). It's way more ergonomic than doing things with bash, jq, yq, mlr, awk, Perl (with only the core libs available), etc. Figured I'd just go with it and maybe introduce it to my peers. Folks noticed the formatted output right away as better so now I've written up daily examples and been asked to demonstrate it.
I really want to give #nushell a go as my login shell but I'm struggling with weird a error. Last time I tried I set up a scripts module dir .config/scripts with some nu scripts I want sourced on launch. I have in env.nu
Ok, I've figured this out. The problem is that I had an unrelated scripts directory in the directory I was launching #nushell from. That seems to override my NU_LIB_DIRS setting and lead to the error.
I've now moved my scripts to .config/nushell/_scripts and now use _scripts * works fine.
Built-in support for structured data (lists and tables) in #Nushell is great, but I feel strong typing and sane syntax sealed the deal for me. Now I feel confident writing 3+ lines of a shell script thanks to Nushell, and I'm more inclined to separate those out into custom commands/functions. With strong typing and LSP support I can get inlay hints with inferred types while editing scripts, not even mentioning errors highlighting in the interactive shell itself. Massive productivity boost
I initially thought about doing that with Go since Go is a bit more ergonomic for just spiffing out code IMHO, but the tooling around Rust is simply surpassing Go at an incredible pace.
Had to give up getting #nushell on GrandPapi, my trusty :rpi: 1. Rust build failed after filling up 1.6G of remaining space. One day the old guy will get a newer larger SD-Card 🤷🏻♂️ crazy to think how many years it has been surviving (doing mostly nothing except getting updates).
@akosma Well, I couldn’t figure a case where I’d need it. Except that one specific case of #nushell not having packages but I preferred the rust way as this is something I’d install anyway for other stuff.
@hywan I wish new tools would invest more into transitioning help.
For example in #nushell when I type a well known bash command it could just suggest the correct way. Transitions for a decades old habit would be made easier.
@tcltk@clacke@nixos@tcl interesting, how realistic Tcl can become a replacement for bash for building derivations and having phases, etc. ? (aka nixpkgs stdenv)
@raito@tcltk@clacke@nixos I’ve been planning to try this since forever and I’ve been slowly packaging stuff to that end. #Nix and #Tcl would go so well together!
The #nushell talk at #NixCon reminded me of this again, but my list of ongoing side projects is a little too big at the moment 😅. Still, if anyone is working on it please let me know!
(sorry for the necropost, I just found the thread by browsing tags)