←back to thread

Microsoft Edit

(github.com)
486 points ethanpil | 8 comments | | HN request time: 0.001s | source | bottom
Show context
anyfoo ◴[] No.44372516[source]
Fun. I must admit I don't really know who this is for, but it seems fun.
replies(5): >>44372607 #>>44372679 #>>44372736 #>>44373224 #>>44373591 #
DrJokepu ◴[] No.44372607[source]
It’s right there in the readme actually:

> The goal is to provide an accessible editor that even users largely unfamiliar with terminals can easily use.

replies(2): >>44372647 #>>44372719 #
scblock ◴[] No.44372647[source]
That may be the written goal, but I doubt that's the actual reason the project exists.
replies(2): >>44372682 #>>44372718 #
cosignal ◴[] No.44372682[source]
Yeah ... I don't think there's any overlap between "users largely unfamiliar with terminals" who want something easy to use, and 'Linux users who are sufficiently technical that they would even hear about this repo'.
replies(7): >>44372753 #>>44372760 #>>44372902 #>>44373046 #>>44373211 #>>44375293 #>>44376841 #
1. zamadatix ◴[] No.44372760[source]
The title is a bit confusing depending how you read it. Edit isn't "for" Linux any more than PowerShell was made for Linux to displace bash, zsh, fish, and so on. Both are just also available with binaries "for" Linux.

The previous HN posts which linked to the blog post explaining the tool's background and reason for existing on Windows cover it all a lot better than a random title pointing to the repo.

replies(1): >>44375201 #
2. egorfine ◴[] No.44375201[source]
TIL PowerShell exists for Linux.

But.. why?

replies(2): >>44375348 #>>44378682 #
3. skc ◴[] No.44375348[source]
Well why not?

Is there supposed to be a single elected shell for Linux? Powershell on Linux is just one of plenty others.

replies(1): >>44376208 #
4. egorfine ◴[] No.44376208{3}[source]
I'm not against it. Absolutely go for it.

I just wonder what was the reason to port it and then I would like to have a word with a real living person who is actually using that shell.

replies(2): >>44376592 #>>44380629 #
5. MattSteelblade ◴[] No.44376592{4}[source]
I believe this was the original announcement https://azure.microsoft.com/en-us/blog/powershell-is-open-so.... I have used it on Linux and it is included by default in Kali and ParrotOS.
6. trelane ◴[] No.44378682[source]
Well, parts of it do, anyway.

As with .net, it is not intended to let you easily get away from Microsoft.

https://learn.microsoft.com/en-us/powershell/scripting/whats...

7. WorldMaker ◴[] No.44380629{4}[source]
PowerShell lends itself really well to writing cross-platform shell scripts that run the same everywhere you can boot up PowerShell 7+. It's origins in .NET scripting mean that some higher-level idioms were already common in PowerShell script writing even before cross-platform existed, for instance using `$pathINeed = Join-Path $basePath ../sub-folder-name` will handle path separators smartly rather than just trying to string math it.

It's object-oriented approach is nice to work with and provides some nice tools that contrast well with the Unix "everything is text" tooling approach. Anything with a JSON output, for instance, is really lovely to work with `ConvertFrom-Json` as PowerShell objects. (Similar to what you can do with `jq`, but "shell native".) Similarly with `ConvertTo-Json` for anything that takes JSON input, you can build complex PowerShell object structures and then easily pass them as JSON. (I also sometimes use `ConvertTo-Json` for REPL debugging.)

It's also nice that shell script parameter/argument parsing is standardized in PowerShell. I think it makes it easier to start new scripts from scratch. There's a lot of bashisms you can copy and paste to start a bash script, but PowerShell gives you a lot of power out of the box including auto-shorthands and basic usage documentation "for free" with its built-in parameter binding support.

replies(1): >>44427260 #
8. egorfine ◴[] No.44427260{5}[source]
That's a very good and insightful comment. Thank you!