With cmd, I can do
cmd /K cd /D "c:\repo"
to open cmd in c:\repo
How to do the same with console2 when using cmd as a shell?
With cmd, I can do
cmd /K cd /D "c:\repo"
to open cmd in c:\repo
How to do the same with console2 when using cmd as a shell?
From the command line options help:
-d <directory>
Specifies a startup directory. If you want to parametrize
startup dirs, you need to specify startup directory parameter as "%1"\
(backslash is outside of the double quotes)
In 2.00b147, navigate to Edit -> Settings -> Console
and enter your desired directory in the Startup dir
field.
Not directly an answer but I found this to be even more convenient: https://github.com/kodLite/cppStartingKitProject-Guide/blob/master/source/Console_2--Usage--Open_Console_Here.rst
This adds an option to the right-click menu to open in that specific folder. Won't work in combination with the "Startup dir""setting though!
Update: Changing the reg a bit will make it even better (open selected folder in Console as well)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Console2]
@="Open in Console2"
[HKEY_CLASSES_ROOT\Directory\shell\Console2\command]
@="C:\\Path\\To\\Console\\2\\Console2.exe -d %0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Console2]
@="Open Console2 Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Console2\command]
@="C:\\Path\\To\\Console\\2\\Console2.exe"
© 2022 - 2024 — McMap. All rights reserved.
%CD%
doesn't work. – Prevenient