-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set tasks to always use CMDER_START #803
Conversation
CMDER_START should always be set as a result of either: 1. The user passes a directory to cmder.exe using `/START $DIR` - or - 2. Sets CMDER_START as a default environment variable. Fixes #772
I don't understand the need for this. With #798, there are a few ways to startup:
So IMO we are ok with the "start in the right dir" problem. Or what is still missing (-> whats the to be solved problem in #772)? IMO always setting CMDER_START will result that the task definitions startup dir will be useless, which I find not so nice, as it is quite a big button in the conemu UI. |
Just to make that clear: the above is currently happening for PS and cmd, but not for bash tasks. To make that happen as well, this could be applied: diff --git a/vendor/cmder.sh b/vendor/cmder.sh
index 4d1da3a..9e21e31 100644
--- a/vendor/cmder.sh
+++ b/vendor/cmder.sh
@@ -51,3 +51,8 @@ fi
if [ -f "${HOME}/.bashrc" ] ; then
. "${HOME}/.bashrc"
fi
+
+if [ "$CMDER_START" != "" ] ; then
+ CMDER_START="$(cygpath -u "$CMDER_START")"
+ cd "${CMDER_START}"
+fi [should be checked by someone familiar with bash...] |
USER_PROFILE is a known folder, so use that functionality to get it.
This reverts commit 4dc1249.
I've reverted the config changes, although I'll keep the launcher changes as they resolve some issues where CMDER_START isn't set in some instances. |
Set tasks to always use CMDER_START
{ | ||
wchar_t* homeProfile = 0; | ||
SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile); | ||
if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IM this is still a bad change: init.bat will now always set the path to Home if cmder isn't started with a path. This means that startup path in the conemu config is completely useless now :-(
This also means that you can't do what's asked for in #203
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep just realised 😨
See inline comments: IMO always setting |
CMDER_START should always be set as a result of either:
/START $DIR
ORFixes CMDER_START should always be set to USERPROFILE unless explicitly set through /START parameter #772