Live data from Hacker News

Inside the Windows Console

blogs.msdn.microsoft.com

141–150 of 259 posts

Re: Inside the Windows Console

#141
post #135
post #86

Earlier quoted context omitted.

There's actually an option in Settings to swap between Powershell and cmd.exe in the Win + X menu. On top of that you can actually go in and customise it quite a bit to your own liking as it's just a folder inside your local app data: C:\Users\YourWindowsUsername\AppData\Local\Microsoft\Windows\WinX

Unfortunately it has no effect on the menu in Windows Explorer which also dropped cmd for PowerShell recently.

You can add a right-click "Console Here" menu item yourself. It's one of the things I've done on fresh installs of Windows since 95.

    HKCR\*\shell\Console Here\command
    Default="%WINDIR%\system32\cmd.exe"

    HKCR\Directory\shell\Console Here\command
    Default="%WINDIR%\system32\cmd.exe /k cd %1"

Re: Inside the Windows Console

#142
post #78
post #69

Earlier quoted context omitted.

Its not quite UNIX style - it works like a weird frame selection instead of follow the text LtR like any *nix console I can think of. It would be super if that could be fixed as well with an option.

I'm pretty sure it's block/column selection instead of line selection. Why they made that design decision, we will never know. Maybe a dev was working with a lot of hex output? (even so, he should be slapped retroactively, unless he's Raymond Chen, cause Raymond Chen is amazing so we'll forgive his transgressions)

This is one of the major changes that happened since this team started working on the console. In Windows 10 it has line selection that flows correctly over line breaks.

Re: Inside the Windows Console

#143
post #105
post #89

Earlier quoted context omitted.

C-r is a feature of the PSReadLine module for PowerShell.

For cmd you can install clink.

I really hope they include clink in the native Windows console, it's such a great addition.

type directory name... hit tab... get slash added automatically at the end... mind blown

Re: Inside the Windows Console

#144
post #135
post #86

Earlier quoted context omitted.

There's actually an option in Settings to swap between Powershell and cmd.exe in the Win + X menu. On top of that you can actually go in and customise it quite a bit to your own liking as it's just a folder inside your local app data: C:\Users\YourWindowsUsername\AppData\Local\Microsoft\Windows\WinX

Unfortunately it has no effect on the menu in Windows Explorer which also dropped cmd for PowerShell recently.

I tend not to use the file menu in Windows Explorer, but yeah it'd be nice if that option swapped it there too.

I found out recently you can just type "cmd" in the Explorer address bar and hit enter and it'll open cmd.exe to the current directory, so long as you're not in a special shell folder or an unmapped network share. That's saved me a bunch of time.

Re: Inside the Windows Console

#145
One thing I've always missed is tabbed consoles. I've use Cmder (http://cmder.net/ I have no affiliation) for quite a while now and has been totally awesome as it provides a tabbed container window with any mixture of cmd.exe, bash shell, launching as Admin and best of all it persists all your windows after reboot.

Re: Inside the Windows Console

#146
post #123

Earlier quoted context omitted.

The terminals you use in Linux must either be painfully slow or you must be very insensitive to latency issues because the latency on Windows console is really high. When I type something I expect it to appear immediately ( A lot of basic commands in general run more slowly on Windows but I don't think that's the terminal's fault so much as it's lack of optimisation on the command itself.

Afaik, 10ms is not achievable nowadays, unless you use a very old computer. https://danluu.com/input-lag/

> For desktop results, results are measured from when the key started moving until the screen finished updating

When the key starts moving and when the key actually actuates are very different times. Some of this latency could be key travel time. This is also a methodical issue I found with his [keyboard latency test](https://danluu.com/keyboard-latency/).

Re: Inside the Windows Console

#147
post #24

I tried using PowerShell or Hyper. But these are just so slow to start. So I'm always coming back to cmd.exe. It is fast and serves my basic needs just perfect. When I need more, I just type 'bash'. And bash also starts faster than PowerShell or Hyper. So I don't see why they now change WIN+X and Explorer to use PowerShell rather than cmd.exe. Keep improving cmd.exe. But please don't make it bloated.

I think your experience is atypical. I use powershell everyday and I've not noticed any startup time difference between it and cmd. Are you sure you don't have some gigantic import in your profile.ps1? Are you launching the really terrible and definitely slow as balls to launch Powershell IDE?

Frankly, given how superior powershell is as a language (both to cmd and bash) it is beyond me why anyone would consider a small startup cost difference a dealbreaker anyway.

Re: Inside the Windows Console

#148
post #24

I tried using PowerShell or Hyper. But these are just so slow to start. So I'm always coming back to cmd.exe. It is fast and serves my basic needs just perfect. When I need more, I just type 'bash'. And bash also starts faster than PowerShell or Hyper. So I don't see why they now change WIN+X and Explorer to use PowerShell rather than cmd.exe. Keep improving cmd.exe. But please don't make it bloated.

I think your experience is atypical. I use powershell everyday and I've not noticed any startup time difference between it and cmd. Are you sure you don't have some gigantic import in your profile.ps1? Are you launching the really terrible and definitely slow as balls to launch Powershell IDE? Frankly, given how superior powershell is as a language (both to cmd and bash) it is beyond me why anyone would consider a sm…

I've got no powershell customizations, and an i5-4670k. I've also experienced Powershell having a very noticeably slow startup. It's about on par with my heavily modified zsh setup on a 2015 MBP for startup time (the same zsh setup starts up much faster on the same desktop).

It's not a dealbreaker, but it's definitely an annoyance.

Re: Inside the Windows Console

#149

One thing I've always missed is tabbed consoles. I've use Cmder ( http://cmder.net/ I have no affiliation) for quite a while now and has been totally awesome as it provides a tabbed container window with any mixture of cmd.exe, bash shell, launching as Admin and best of all it persists all your windows after reboot.

Another Cmder lover here. Although when the Windows 10 "Sets" UI comes out and default Powershell/conhost has tabs built in, it may be time to just stick with that. We'll see...

Re: Inside the Windows Console

#150
post #58

Earlier quoted context omitted.

Even on Windows I use mingw64 terminal + pacman. My pain points are: - Conemu can show up on a shorcut, Windows Console can't - Windows Console doesn't have tabs - There is no CTRL + R to search for the last command Ok maybe I've got more bash issues: - autocompletion in cmd doesn't work, not for commands nor for command arguments, like in Linux consoles - mc doesn't work in cmd - I really hate dos batch language bec…

> There is no CTRL + R to search for the last command On Unix this is typically a shell feature, not a console/terminal feature. The corresponding way to do this in the Windows console would be F8, I think. > autocompletion in cmd doesn't work > I really hate dos batch language None of those have anything to do with the console .

Wow! This blew my mind. I have grown very used to using cmd, but have not thought of using the F keys before (do not know why). Behavior seemed strange at first, but after a quick DDG search found this StackOverflow question [0] and that led to this documentation [1]. This is a huge area of functionality which I don't think most people know about.

I will be using F7 a lot in the future.

As an aside, maintaining backwards compatibility (this is DOS era stuff) is why IMO it would be very hard to update core windows utilities, but maintaining backwards compatibility (and similar decisions) is why IMO Windows is as popular as it is.

[0] https://stackoverflow.com/questions/1641948/f-n-shortcuts-in...

[1] https://docs.microsoft.com/en-us/previous-versions/windows/i...

Post reply on HN