News for hackers. Stuff that matters.
Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell by __MatrixMan__ on Wednesday February 14, 2024 @02:37PM (#39374156)
Nushell is great fun, but be prepared to encounter and fix errors when you paste code designed for sh/bash/zsh/fish. It's a much bigger step away from convention than the others.

I think the one that catches me off guard the most is:

    export FOO=bar
    BAZ=qux
Is now

    $env.FOO = "bar"
    BAZ = "qux"
It makes more sense the nu way, but old habits die hard.
Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell by out-of-ideas on Wednesday February 14, 2024 @05:06PM (#39376223)
nushell requires double quotes around values? looks like powershell where everything-is-an-object of something-else
Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell by __MatrixMan__ on Wednesday February 14, 2024 @06:29PM (#39377065)
If you want those values to be strings, yes. For instance, it knows that this is a list of ints:

    $ [1, 2] | math max
      2
And here are some strings:

    $ ["a", "c"] | str join "b"
    abc
And there are tables

    $ [
       {name: "foo", value: 6},
       {name: "bar", value: 9}
      ] | where value > 7 | get name
    bar
And that's about as weird as the types get.
Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell by pxc on Wednesday February 14, 2024 @04:23PM (#39375598)
I don't see much use for such pasting and fixing up— I generally find it more painful than other methods.

For short snippets, better to read, understand, and translate as you type.

For some shell integrations or environment setup tools, use fenv or babelfish.

For scripts of any length, just save it and run it. The shebang'll invoke bash or whatever is needed.