Cmder: Request: Bring back CMDER_START.

Created on 18 Mar 2020  路  13Comments  路  Source: cmderdev/cmder

I would love to see something equivalent to CMDER_START return to cmder. It's nice to have an environmental option for the startup directory, rather than relying on modifying startup directories for specific tasks. It also would mean that additional tabs that were launched could default to the specified startup directory, rather than CMDER_ROOT.

All 13 comments

@ryanpcmcquen Try cmder c:\windows.

@ryanpcmcquen If you have -new-console [path] in any task remove it and cmder will start in the current working dir or any dir specified on the command line

@daxgames, that works, but I would still prefer an environment setting for this. No worries if that isn't planned or wanted though.

You can still do this with an environment setting by creating a shortcut that has an environment variable as a command line option. Then set the environment variable globally via the advanced settings on windows.

True, but then I have to create a shortcut. It's another step in provisioning/configuring. Trying to minimize touch points, and I already copy/paste enviro settings for cmder on a new machine, so this would just be less steps.

Again, if it is too much maintenance to bring this back, I understand, I just think it is generally useful and would be nice to have.

So something like:

If defined CMDER_START (
    cd /d %CMDER_START%
)

If that works then you could also add it to a default %cmder_root%\config\user_profile.cmd

Not completly against it just giving you options you can implement now.

For now I just do a user_startup.cmd in profile.d with:

cd /d "%UserProfile%\code"
pushd "%cd%"

And yet another valid option! :+1:

The only problem is its global and overrides command line options.

@ryanpcmcquen Why do a cd /d [path] then a pushd %cd%. the forst command puts you where you need to be so the second command is redundant.

It does, but then I can easily get back to the original CMDER directory if needed ... so is this not planned?

You mean re-implementing %cmder_start% in the main code base? I don't see any reason to do so at this time and I would like to go and look at why it was removed I the first place.

There are multiple working ways to do it in this thread without adding it to the main code base.

FYI type cmderr to get back to the Cmder root from any folder.

OK. I remember now why I needed the cd and pushd, you can use _only_ pushd if you put the pushd command inside of user_profile.cmd, but if you are using a script inside of profile.d (as I was), you need both or else it won't actually change the directory. It is some kind of weird environmental thing.

That is wierd I would not have expected that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tfarina picture tfarina  路  3Comments

bmeverett picture bmeverett  路  3Comments

isnullxbh picture isnullxbh  路  3Comments

hyrious picture hyrious  路  3Comments

GlassGruber picture GlassGruber  路  3Comments