News for hackers. Stuff that matters.
Re:Why does the New menu even exist for creating new empty f... by lp0_on_fire on Tuesday July 20, 2021 @10:38PM (#27901761)
>This is handy for running scripts, but why the "shift" modifier? Same for "Open commandline/powershell" when right clicking whitespace of directory.

Not a solution to your particular gripe but you can actually type "powershell" or "cmd" (minus quotes) into the address bar in windows explorer and it will open in that directory.

Re:Why does the New menu even exist for creating new empty f... by cm2187 on Wednesday July 21, 2021 @03:48AM (#27903503)
Yes, and there is a long standing bug. Once you have done that, if you go back to the folder window in explorer, and try to select/copy the folder path, all you will get is the path to cmd.exe instead.
Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Tuesday July 20, 2021 @10:44PM (#27901796)
Holy crap, you can too. Thanks for the tip!
Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Wednesday July 21, 2021 @02:06AM (#27902849)
Further clarification: google and 3 seconds of testing advise you can run any executable in your PATH environment variable.

Though there is some other step going on as "powershell" will set the current working dir on startup. Possibly a class entry in registry defining the full command to run.

Re:Why does the New menu even exist for creating new empty f... by RcouF1uZ4gsC on Wednesday July 21, 2021 @12:03AM (#27902200)
Amazing!

I have been using Windows since version 3.1, and still did not know this trick. HN is truly an amazing place!

Re:Why does the New menu even exist for creating new empty f... by fomine3 on Wednesday July 21, 2021 @03:55AM (#27903563)
IIRC this is from Vista
Re:Why does the New menu even exist for creating new empty f... by mmis1000 on Wednesday July 21, 2021 @04:20AM (#27903729)
Also "code.cmd ." if you have vscode installed. The address bar works actually like the "Run" box. Capable for running random commands.
Re:Why does the New menu even exist for creating new empty f... by jabbequbs on Wednesday July 21, 2021 @12:31AM (#27902349)
Another one that I use from the address bar is "subl -n ." to open a temporary Sublime Text project. I imagine you could do something similar with VS Code.
Re:Why does the New menu even exist for creating new empty f... by jackson1442 on Wednesday July 21, 2021 @01:05AM (#27902519)
I use a Mac, but I very frequently use `code .` to open vscode for the current directory.
Re:Why does the New menu even exist for creating new empty f... by mmis1000 on Wednesday July 21, 2021 @04:22AM (#27903746)
That didn't work in windows because it tries to open the unix shell wrapper "code" instead of "code.cmd" for some reason.(Because I have wsl2 installed?) Type "code.cmd ." instead works.
Re:Why does the New menu even exist for creating new empty f... by sundvor on Wednesday July 21, 2021 @08:43AM (#27905494)
Hmmmm, I use WSL2/Ubuntu and I always navigate to my folder in Terminal and type `code .` from there - works perfectly. Really love this integration.
Re:Why does the New menu even exist for creating new empty f... by ToFab123 on Tuesday July 20, 2021 @11:34PM (#27902065)
On win 11 typing cmd open a command prompt. Typing powersshell makes explorer navigate to "documents\powersshell".

Edit: typing powershell.exe does the trick

Re:Why does the New menu even exist for creating new empty f... by drdeca on Wednesday July 21, 2021 @12:10AM (#27902236)
You sure it isn’t just because you wrote powershell as powersshell ? The former worked for me
Re:Why does the New menu even exist for creating new empty f... by ToFab123 on Friday July 23, 2021 @04:07AM (#27928383)
I looked into it and it is because I have a folder in "my documents" that is named "powershell". If I rename that folder typing "powershell" opens a new powershell prompt.
Re:Why does the New menu even exist for creating new empty f... by int_19h on Wednesday July 21, 2021 @03:11AM (#27903245)
Better yet, "pwsh".
Re:Why does the New menu even exist for creating new empty f... by Gibbon1 on Wednesday July 21, 2021 @02:59AM (#27903151)
If you type a url it'll open it in a browser as well.
Re:Why does the New menu even exist for creating new empty f... by amanzi on Tuesday July 20, 2021 @11:11PM (#27901945)
Wow - news to me! thanks.