Earlier quoted context omitted.
I made a big push at some point to start using Powershell instead of the horrible .bat files I had written at some point (and their arcane unreadable commands). But Powershell's syntax, convoluted names and the unreadable code we had to write to do simple things really made me reconsider seriously. I simply use Python for these things (99% time it has all I need).
I don't really understand this. If you don't like the verbose names of PowerShell commands, you still have the option to set up command aliases. Out of the box, PowerShell includes a number of common Unix terminal commands as aliases: https://technet.microsoft.com/en-us/library/dd347739.aspx
A Saner Windows Command Line
91–100 of 164 posts
Re: A Saner Windows Command Line
#92>> Let's be honest. What many people think of as "the default Windows command line", cmd.exe, is atrociously bad. Selection is awkward, resizing is hard, the syntax is arcane, the list goes on. If you do nothing else, there are two things you can do to make the basic, vanilla experience bearable. Funny, from a guy coming from Windows to Unix I think the exact opposite. Each command comes with a bazillion options and…
> cd..
So your rant is about the syntax, of a language established for decades. You have options though: modify bash, or raise awareness enough that a simple `alias cd..='cd ..'` is included in the default release.
Re: A Saner Windows Command Line
#93>> Let's be honest. What many people think of as "the default Windows command line", cmd.exe, is atrociously bad. Selection is awkward, resizing is hard, the syntax is arcane, the list goes on. If you do nothing else, there are two things you can do to make the basic, vanilla experience bearable. Funny, from a guy coming from Windows to Unix I think the exact opposite. Each command comes with a bazillion options and…
Who's calling the kettle black? You seem to be painting this as a Windows vs. Unix thing, but the original article never mentioned Unix.
Re: A Saner Windows Command Line
#94At our office we jokingly refer to powershell as "two googles per line" - a term coined by its strongest proponent at the company. It thought it would come naturally over time, but it never does. It seems needlessly cryptic and verbose in so many ways. I've started using LinqPad for stuff I would normally do in cmd now.
I don't really understand this- I always found the "get-help" commandlet to be sufficiently informative, unless they were using parts of the .NET framework that I wasn't already familiar with, in which case I needed to go read about those objects/etc. on my own. Is this that bad?
That isn't much comforting. And frankly, MS always pushed Power Shell as a better way to do things than the ancient options for command line, thus color me disappointed that it couldn't be better than the "default choice" Bash.
Re: A Saner Windows Command Line
#95Earlier quoted context omitted.
I prefer Python when appropriate, but if you're going to "shell out" a lot and pipe a bunch of commands together it starts getting too verbose and loses it's elegance. I agree with other posters that bash is not intuitive, but if you've worked with it for a long time, there's nothing like being able to cat | grep | sed in a one-liner, rather than creating a bunch of Process objects, etc.
If you're doing cat, grep, sed I'd say that bash is very intuitive and I use it for that purpose all the time. If you're writing bash scripts, with if structures and loops and everything, then just python.
Re: A Saner Windows Command Line
#96except that there's tons of drawbacks to counteract said benefits. Privacy notwithstanding, power-use has been fractured and the flow of configuration ruined in 10
Re: A Saner Windows Command Line
#97Earlier quoted context omitted.
PowerShell objects are actually a superset of . Net objects. They can also represent COM objects, WMI objects, XML nodes, etc. You can also export them to CSV, XML, JSON, and yes, even text. If you have cygwin installed you can pipe to and from the cygwin commands from PowerShell and pipe to and from powershell.exe from your cygwin shell.
Languages are not the same, you'll never have interoperability; try exporting a .NET object with a 64-bit integer to be consumed by JavaScript, for example. Text wins.
$obj = [PSCustomObject]@{ Number = [long]2 }
$obj | ConvertTo-Json
Re: A Saner Windows Command Line
#98Earlier quoted context omitted.
PowerShell objects are actually a superset of . Net objects. They can also represent COM objects, WMI objects, XML nodes, etc. You can also export them to CSV, XML, JSON, and yes, even text. If you have cygwin installed you can pipe to and from the cygwin commands from PowerShell and pipe to and from powershell.exe from your cygwin shell.
Languages are not the same, you'll never have interoperability; try exporting a .NET object with a 64-bit integer to be consumed by JavaScript, for example. Text wins.
Re: A Saner Windows Command Line
#99To hear bash-people to call Powershell "non-intuitive" sounds like those immigrants that go to a foreign land, refuse to learn the local language and insist on the natives to understand their immigrant language. Or like programmers that think that every programming language should have the C syntax. Bash and Unix commands are only "intuitive" after years of practice; Powershell is not different. And it doesn't have a…
The excessive verbosity and object safety is great for admin scenarios where you don't suddenly destroy your corporate email transition because of a VP with an apostrophe in her name. But at that point perhaps you should just use C# instead?
But for everything else it just looks nuts to outsiders. That's why even the MS developer groups are releasing command line tools cross-platform that behave like Unix apps, not PS monstrosities.
https://azure.microsoft.com/en-us/documentation/articles/xpl...
Powershell should be a feature that draws people from AWS. Instead it is seen as a drawback, even inside MS.
Re: A Saner Windows Command Line
#100To hear bash-people to call Powershell "non-intuitive" sounds like those immigrants that go to a foreign land, refuse to learn the local language and insist on the natives to understand their immigrant language. Or like programmers that think that every programming language should have the C syntax. Bash and Unix commands are only "intuitive" after years of practice; Powershell is not different. And it doesn't have a…
Windows fanboy here. Powershell made the mistake of combining a bad command prompt with a bad scripting language. It is not a "shell" at all. It is bad Python. The excessive verbosity and object safety is great for admin scenarios where you don't suddenly destroy your corporate email transition because of a VP with an apostrophe in her name. But at that point perhaps you should just use C# instead? But for everything…
Learn some alias's if you don't like the Get-X style of functions.
gal * | more
Will list tons of alias's for you.