-
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
Setting cmder startup directory. #57
Comments
Looks like you saved the init.bat file as UTF-8 with BOM try to save it without BOM You could switch in one command with: |
Thanks that fixed it. Not sure why the BOM was saved, I opened in Notepad++ and my settings is set not to save with BOM. However, opening the file in VIM showed the characters. |
Instructions: Open Cmder -> Settings -> Tasks -> select {cmd::Cmder} (in my case). On the bottom (below textarea) you have button named "Startup dir...", and than select startup directory. Close cmder, and start again. That's it, enjoy |
While hmatijevic's tip was helpful, it took me a while to process as a Cmder noob. In the last step, replace %USERPROFILE% with N:\ where N:\ is the drive or location you wish to start in. |
@hmatijevic very helpful,thanks! In my case,the default {cmd::Cmder} looks like this: It works great :) |
Click Settings -> Startup -> Tasks |
Interestingly enough Under "Startup directory for new process:" it still says a different directory than what actually initiates in a new cmder tab...huh oh well |
@akinhwan can you try the latest master build and tell me if it is better now? https://ci.appveyor.com/project/MartiUK/cmder/build/1.0.521-master/artifacts |
@Stanzilla, in case you were still looking for feedback about your last post: I was running into this issue with 1.3.3, and 1.3.4, but the build you posted above works for me. |
This doesn't seem to work for me:
It still opens in |
try this: for bash::Git bash : |
Edit the file: \CMDER_DIRECTORY\config\user-profile.cmd
On bellow example, I've changed the directory and created a rotine to start homestead.
|
Too bad this is working, but then the "Open CMDer here" from the context menu (windows) isn't working anymore. It is forced to the startup directory all the time. |
@bertoost don't set that setting. Cmder is a package of 4 different products each with its own individual settings that sometimes conflict. Cmder.exe will open in the current working directory or a directory you supply on the command line. If you want cmder to launch from a shortcut in a certain folder every time configure the shortcut start directory instead. |
@daxgames Is there any solutions working both |
Cnder.exe will open in the current |
Yup that is correct |
Wow, today I learned that Windows shortcuts let you choose where to start a program in them. Setting it to %USERPROFILE% did exactly what I wanted. Thanks! |
@SteveLemire that's a bit heavy handed as it will force that task to always open to that folder. Maybe that's what you want but it limits some other functionality. You could just launch Cmder using a command line argument like |
@SteveLemire nice |
Thank you |
It does say something about this issue that even after many years I still have to look this comment up to find that button. |
I'll say this again. That's a bit heavy handed as it will force all tasks to always open to that folder. Maybe that's what you want but it limits some other functionality. You could just launch Cmder using a command line argument like |
Is this some magic behind the curtains that will break without me noticing or is this something that I can correct once it occurs? Because so far I didn't notice anything.
This doesn't help when I use ctrl+t to open a new tab, right? |
Cmder.exe will open a session in a folder passed on the command line. It has nothing to do with new tabs or |
Cmder exe is already running, I press ctrl+t and it open in scoop directory where cmder is installed, every damn time. I understand that with arguments or with additional commands, or with a different operating system on a different planet with different problems this would be solved differently. I am not sure about
|
Hopefully I have answered your questions. Let me know if not. |
I am sorry that you feel any kind of hostility, I want to assure you that was not my intent. Many thanks for the detailed answers, your analysis seems fully correct to me. It appears to me that picking any of the alternatives would be orders of magnitude much more work for something I don't use at the moment than what I do currently. I am also sorry about my first comment though, indeed the setting is not for what I thought it was. Should I edit my earlier comments to make this clear? |
No problem. Whatever you want to do, I just wanted to makw syre you had answers to you queations. |
I'm trying to change the directory in which cmder starts up. To do this, I just added the following to the end of my init.bat file:
Its not very elegant but it works, and it prints some funny message as the first line of text:
Is there a better way to do this? Or at least get rid of the first line message?
The text was updated successfully, but these errors were encountered: