The Future of Shells with Nushell! Shell + Data + Programming Language

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 53

  • @DevOpsToolkit
    @DevOpsToolkit  หลายเดือนก่อน +5

    What do you think of Nushell?

    • @wladyx
      @wladyx หลายเดือนก่อน +1

      Looks great, are you using it as a daily shell?

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +2

      @wladyx I use it for all my scripts and as a daily shell. The only exception are the videos where I do now use it for setup scripts but not as shell, mainly to make instructions useful for everyone.

    • @illiakailli
      @illiakailli หลายเดือนก่อน +1

      I think it's great! Was always wondering if it's possible to pass typed data through a pipe, so that shell autocomplete is not as blind as it usually is. Do you know if types of returned data items can be specified upfront, or everything is a 'table'? It would be cool if tables are also more specifically typed and autocomplete can take advantage of that information to give more adequate suggestions.

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน

      There are quite a few data types Nushell uses. You can see what a specific output is by piping it to `describe` (e.g. `ls | describe`). You can see the data types at www.nushell.sh/book/types_of_data.html.

    • @cholst1
      @cholst1 หลายเดือนก่อน +1

      Been using nushell in zellij for well over a year now and love it. I don't really use it very hardcore, i just like the feel out of the box

  • @nubuo_
    @nubuo_ หลายเดือนก่อน +28

    It feels like someone taking a better swing at what Powershell was trying to achieve.

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +5

      True. Powershell was cursed by being Windows only (or Windows first) but it had (and still has) some great ideas and I can see some of them in Nushell.

    • @elovelan
      @elovelan หลายเดือนก่อน +3

      I use PowerShell about 90% of the time on Linux for this reason. What do you like better about Nushell's approach?
      My biggest gripe is completion support, but a lot of CLI frameworks in Go and Rust now support creating PowerShell completions automatically.

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +5

      @@elovelan To be honest, I haven't used Powershell in a long while. I used it briefly almost 20 years ago when it was released and discarded it. I don't remember it in details. Back then, it was Windows-only so that was the main reason why I did not jump on it. I should give it another try.

    • @elovelan
      @elovelan หลายเดือนก่อน +4

      ​@@DevOpsToolkit I definitely like that Nushell feels much more similar to POSIX-like shells.
      However, I do find PowerShell worth the learning curve since I find its code more readable and thus more maintainable (at the expense of a lot of verbosity). I've been working in Bash since the mid-2000s and I still sometimes struggle to remember some of the more terse replacement syntax.

    • @arieheinrich3457
      @arieheinrich3457 หลายเดือนก่อน

      @@DevOpsToolkit Not necessarily a better swing. PowerShell (dubbed pwsh) is OSS and cross platform. Pipes are essential but instead of strings (what you call text) its now an object (what you call data) and thus has properties so a full blown language. This has been like this for quite a few years, so the demo is not surprising, its more, what took so long for this to happen ?
      The get-hyperscale examples is basically a PowerShell function that is available in memory. The .nu files are just functions in a .ps1 file.
      The detect-columns is impressive, probably require a separate function so nice abstraction for better experience.
      Interesting how it deals with help of commands in .nu files. I suspect similar to how Get-Help that exists in pwsh.
      I would actually challenge you, now that all IDEs come with some sort of AI coding assistant, spend 2 weeks with only pwsh. Come with open mind and you will realize just how powerful pwsh is for Linux admin. Your Pros list is basically some of the reason pwsh is so powerful already.

  • @LeFlamel
    @LeFlamel 20 วันที่ผ่านมา +2

    I'm pretty new to really using the CLI - I have no bias towards POSIX compliance... what I'd want out of POSIX compliance is that commands can be composed together - so Nushell out the gate delivers what I assumed was the point of POSIX, with a lot less headache.

  • @DerekMurawsky
    @DerekMurawsky หลายเดือนก่อน +3

    Yeah, as others have said, this very much reminds me of PowerShell. I have been one of those odd guys out for a while now saying how powershell is actually an excellent shell, and now I'm going to have to check this one out.
    Unlike nushell's data pipes, PowerShell pipes full objects in between programs. Overall It is great, but it is highly dependent on the ecosystem of other tools supporting that functionality. I love how nushell lets you detect Data from columns and objects and stuff.

  • @henriklarsen2190
    @henriklarsen2190 หลายเดือนก่อน +2

    Thanks for always great content! I think Nushell looks amazing! I have a 10+ years Powershell background and have often talked with Linux/bash people who did not get how powerful Powershell is. Passing data or objects is just superior compared to passing text around and Powershell has been able to do that for 10 if not 15 years. So in that way I'd say it is about time something similar arrives on Linux and Mac. I know this is not about Powershell, and that it is not perfect either, but it is super powerful and structured compared to various bash commands, that are often the alternative. If Powershell hadn't come out of MS and was cross-platform from the start, we might not have Nushell now.. I see a huge overlap and the fact that Powershell is not used more on none-Windows platforms than it is. I suspect that has something to do with open-source/Linux vs Microsoft from way back. From back when Linux was considered better and finer by many and everything coming out of MS was just bad per definition. Powershell on Linux is also amazing, very user-friendly, very consistent. I'll definitely give Nushell a try. Very inspirational!

    • @Dieze
      @Dieze หลายเดือนก่อน

      I was using powershell at work for some time and got frustrated how dreadfully slow it was in combination with our Endpoint security software.... running "pwsh -NoProfile -c 'echo hello' " can take up to 4 seconds, i'm really not sure what they are doing there
      nushell being fast was the initial reason to try it, and now i'm a complete convert (only get tripped up when writing functions sometimes, i feel like powershell's syntax was less whitespace sensitive...)

  • @IvanRizzante
    @IvanRizzante หลายเดือนก่อน +1

    Thank you for another great video! Definitively interesting, I'm giving it a try right now. I agree that is indeed a new breed of shells, if you need the power of data manipulation it can really be a lifesaver

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +1

      One way or another, much of what we do in shells is about data manipulation. Every time we pipe one command to another we are sending output of one as input to another. The question is mostly whether that data is text or structured.

  • @PygmySurfer
    @PygmySurfer หลายเดือนก่อน +2

    The Windows equivalent to macOS' "open" is "start". "start ." will open the current directory in Explorer, "start file.txt" will open a file in notepad (or whatever your default text editor happens to be).
    It's funny that you used this specific example for "Nushell works everywhere", though - nushell has it's own "open" command, which is essentially like "cat", but it will try to convert the file to a table.
    Enjoyed the video, still not sure if I want to seriously try to use nushell, though :)

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +1

      That's an example of a type of s command that exists in all OSes, yet the command itself is different in each (open/start/xdgopen). I knew that there is one in windows but wasn't sute ehich one it is. Thanks for the info.

    • @xazzzi
      @xazzzi 7 วันที่ผ่านมา +2

      You can `alias read = open; alias open = wslview # or explorer, or start, or xdg-open`, they suggest it in docs, however makes me wonder if it affects .nu scripts then.
      Also it breaks help menu, it will report that the command is alias instead of showing useful info.
      While they have escape hatch for system commands ^, there is no equivalent to specify that you want exactly nushell's own command.

  • @xazzzi
    @xazzzi 7 วันที่ผ่านมา +1

    Tried it recently, but ran into weird issues - like shell hangs on ctrl+c sometimes, or has terrible lag on completions because those seem to be syncronous and run something heavy on each keystroke. Even basic stuff like loading .env - good luck to find a makeshift script for that, and when you do, it won't handle newlines properly.
    While the concept of it is nice, it's those little compound frustrations that make me stick with zsh.

  • @the_graytest
    @the_graytest หลายเดือนก่อน +5

    Already trying it. Maybe I'm being blasphemous, but it kind of feels like pwsh as it should've been intended. It's great so far, diggin it from now on

  • @pettymanny6487
    @pettymanny6487 13 วันที่ผ่านมา +1

    Like your videos!

  • @Jarek.
    @Jarek. หลายเดือนก่อน +4

    I'm not 100% sold to the idea of using Nushell as my daily driver shell. I don't think I need such complex data processing, even in your example - most likely I'd accept downside of no having e.g. files bigger than 1kB... The things changes drastically if we're talking about a scripting language. And here I could imagine writing a tool that manipulates the data in NS. But here another question raises immediately - if the tool is going be a little more complex, wouldn't it be better to write it completely in Python or even Golang and have something which can be maintained not only the author...?

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +2

      I tend to use Nushell much more for scripts than commands in a Shell. I find it to be better than Bash scripts, yet, unlike Golang, focused on being a scripting language. That being said, if I need to create a "serious" CLI, I would still go with Go, but for anything less complex, I find Nushell to be great.

    • @po6577
      @po6577 19 วันที่ผ่านมา +2

      I think the point that everyone can maintain the script is important. It looks great but I don’t think it’s worth switching if all my coworkers are not using it.

    • @DevOpsToolkit
      @DevOpsToolkit  19 วันที่ผ่านมา +1

      @po6577 that's 100% true and applies to any change. All involved need to see the value and be onboard.

  • @MarkusBurrer
    @MarkusBurrer หลายเดือนก่อน +1

    How can I split a command in multiple lines like at 8:48?

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน +1

      Surround the lines with brackets; ( and ). There should be no \ at the end of lines.

    • @MarkusBurrer
      @MarkusBurrer หลายเดือนก่อน +1

      @@DevOpsToolkit Now I get it. But there are no brackets visible in the video

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน

      I showed them near the end. Take a look at th-cam.com/video/zoX_S6d-XU4/w-d-xo.htmlsi=RjjhwoAGvAFidb9y&t=1150 (19:10).

    • @MarkusBurrer
      @MarkusBurrer หลายเดือนก่อน +1

      @@DevOpsToolkit Didn't finish the video until now.

    • @DevOpsToolkit
      @DevOpsToolkit  หลายเดือนก่อน

      No worries. That's an important note about Nushell and I probably should have put it earlier.

  • @saiba-b7l
    @saiba-b7l 12 วันที่ผ่านมา +1

    is it free?