So basically instead of doing dir C:\ I have to learn to type List-Directory-With-Files Drive=C Folder=/ (made up example, but you get the point)
Being verbose would be a good thing (more readable than a cryptic acronym) if there was auto-complete support. A console should really be a small IDE that gives live feedback on what arguments are possible in the current context, etc. But that's not the way powershell was designed.
Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
91–100 of 350 posts
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#92Earlier quoted context omitted.
You can, but sometimes the quoting rules differ. For example, bcdedit with its {}-delimited GUIDs breaks in PowerShell without additional quoting, but works fine in cmd.exe. Makes following online instructions tricky if you're not familiar with that nuance.
Well, the nice thing in PowerShell is that you have explicit control over "stop parsing here and just pass the rest to the application verbatim" with --%. Solves a lot of quoting nightmares.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#93Earlier quoted context omitted.
At least Powershell has Unixy aliases for the common commands. I don't know how many times I've been in a cmd shell and typed ls and then swore at things.
I just wrote batch files that serve as aliases for those. I type ls in my command shell and it does a dir /w behind the scenes, which makes it look more like how it looks in Linux anyway. Here are the ones I have: * cat.bat: type %1 * clear.bat: cls * diff.bat: fc /n /w %1 %2 * ls.bat: dir /w %1% * pwd.bat: cd * touch.bat: echo . >> %1 * top.bat: tasklist All have an @echo off at the top too. Touch is a little janky,…
copy nul %1 >nul
to get an empty file. It's not a replacement for touch, though, as touch will do something different to existing files. Your attempt will silently overwrite the file in that case.Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#94Something that irks me is how PowerShell’s default aliases take precedence over binaries in the PATH. To be able to use the GNU utils, you have to put this in your profile.ps1 : Remove-Item Alias:cat Remove-Item Alias:cp Remove-Item Alias:curl Remove-Item Alias:echo Remove-Item Alias:ls Remove-Item Alias:man Remove-Item Alias:mv Remove-Item Alias:pwd Remove-Item Alias:rm Remove-Item Alias:wget
There are use-cases where globally removing aliases isn't an option (e.g. scripting for use on a machine that isn't yours). For those, it's also possible to evade the aliasing just by explicitly appending the .exe onto the command. 'pwd.exe' gets you the GNU version.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#95That's nice. Can you pipe binary data without powershell corrupting it, or is that now a feature? https://brianreiter.org/2010/01/29/powershells-object-pipeli...
I bet it still truncates output of the ">" operator to the console width, too.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#96They should have used C# as the powershell command language, it looks almost the same, or even F#.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#97So basically instead of doing dir C:\ I have to learn to type List-Directory-With-Files Drive=C Folder=/ (made up example, but you get the point)
Being verbose would be a good thing (more readable than a cryptic acronym) if there was auto-complete support. A console should really be a small IDE that gives live feedback on what arguments are possible in the current context, etc. But that's not the way powershell was designed.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#98Earlier quoted context omitted.
Both DIR and LS do list directories in PowerShell. But all parameters on DIR and LS seem to result in errors, even "dir /h", "dir /?", "dir -h", "dir --help", etc. That is a bit annoying.
DIR and LS are both aliases for Get-ChildItem, which doesn't support the flags you're after.
The issue already happened with cURL.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#99Something that irks me is how PowerShell’s default aliases take precedence over binaries in the PATH. To be able to use the GNU utils, you have to put this in your profile.ps1 : Remove-Item Alias:cat Remove-Item Alias:cp Remove-Item Alias:curl Remove-Item Alias:echo Remove-Item Alias:ls Remove-Item Alias:man Remove-Item Alias:mv Remove-Item Alias:pwd Remove-Item Alias:rm Remove-Item Alias:wget
The weird thing was that Powershell for Mac doesn't do this.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#100"Typing cmd in the run dialog will launch PowerShell as well" What? I'm a big PowerShell fan, but I see the need to keep cmd around for a while. Clobbering it before it's phased out seems problematic.
-bcdedit /c {xxxx-xxx-xxx-xxx} (= {..} is parsed as a code block)
-invoking executables with spaces in path