-
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
Msys bash #702
Msys bash #702
Conversation
Those are way too many unrelated changes for one PR, imo. |
The development branch had no support for a bash shell as previous version did, as for the changes and why I saw most of them as related. Note: See below for possible unrelated changes that could be backed out.
I did the four above changes in the same pull request for the sake of completeness and to match what I saw was happening with the Cmd.exe and Powershell.exe based tasks already defined in the 'development' branch. If you prefer I can back out the two seemingly unrelated changes I mentioned below and resubmit but in my opinion the .gitignore changes are required and should stay. Possible unrelated changes:
|
Why are you replacing cmd with bash? Is this something you think everyone is going to want? |
I was not replacing cmd with bash, at least I don't think I did. I was adding bash using mintty.exe as an additional option because there was none in the 'development' branch I pulled down and I could not figure out the ConEmu commands required to get it woking with cmd. There were three tasks cmd, powershell, and powershell as admin there was no bash. I added the 4th task. Maybe someone added the 4th task launching bash from cmd between when I pulled the development branch and when I created the pull request? I did not even notice it was a change vs. an add in the pull request until now. |
Actually I just pulled down a clean copy of development and there are still only 3 options. No bash. The ConEmu.xml is not loading the 4th task defined in the file that is bash because the ConEmu Task count is set to 3 and not 4. |
@@ -0,0 +1,29 @@ | |||
# DO NOT EDIT FIS FILE IT WILL BE OVERWRITTEN ON UPDATE |
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.
s/FIS/THIS/
Ok from how I understood it, you wanted to add a new task for bash, but you renamed and changed the default one from cmd to bash? |
No, I was trying to add a 4th task because there was no bash task when I look at con-emu tasks. so I added a 4th task. Since the task count in conemu.xml was 3 instead of 4 my attempted 'adding' of a 4th task actually 'edited/replaced' a hidden 4th task called 'git sh' that used cmd.exe to launch bash.exe. I made an additional change to the conemu.xml that renamed the default task from cmd to cmder. this second change was completely unrelated to my msys2_bash change. I am going to resubmit to try and clean this up so there will be a total of 5 tasks:
|
If you do this, it would be nice to get a "cmd as admin" task. BTW: you can push to the branch and it gets refelected in the PR: either push more commits or |
New/Clarified changes:
Any questions let me know. |
@@ -16,3 +16,4 @@ icons\icon_256.png | |||
Cmder.bat | |||
vendor\tmp | |||
appveyor.yml | |||
vendor\cmder.sh |
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.
Are you sure this should be ignored?
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.
Yes. The build.ps1 puts it where it needs to be whenrunning a bash shell.
I ignore it in packing to avoid confusion of having the same file in two
places, vendor/cmder.sh is not used when running cmder.
On November 10, 2015 3:20:06 AM Martin Kemp [email protected] wrote:
@@ -16,3 +16,4 @@ icons\icon_256.png
Cmder.bat
vendor\tmp
appveyor.yml
+vendor\cmder.shAre you sure this should be ignored?
Reply to this email directly or view it on GitHub:
https://github.com/cmderdev/cmder/pull/702/files#r44384444
Having that 5th task available by default is great. I also renamed the 'cmd' task to 'Cmder' myself. I like the idea of having this as default. |
Tasks are not exactly as I stated above. 'Cmder' is the default for a reason, see 9427f9a. The menu looks more like:
|
Very nice. So silly question, but how can I test out the dev branch? Normally I download the zipped file, extract - and it's ready. Do I just put all the files in a folder and that's all I need to do? |
@cmderdev/owners @cmderdev/trusted-contributors LGTM 👍, any thoughts? |
looks ok to me |
@DanielGGordon since it is not merged into this project yet I guess you could:
|
Is the error message I'm getting. Not sure what's going on here. I cloned your fork, checkout out the correct branch and ran the command you said I should. I never use Powershell btw. Kind of new to it. Also, what if I just want to test the development branch in the future (not this fork necessarily), would I need to have the same process? I tried just running the cmder.bat file on the development branch, but that didn't seem to work. |
I just followed the process I outlined and it worked for me. This is what you should see: The initial clone done via Cmder bash:
If you do not have git setup to work with Powershell do everything up to the build.ps1 wherever you do have git working. Then open powershell:
And yes it is the same basic process to test cmder's 'development' branch. The difference is where you clone the initial repo from and which branch you checkout. |
Hmm dunno what to tell you. Cloned, checkout the branch, went into the scripts directory, and tried the command - getting that error. |
It looks like your |
Running Windows 7 64 bit. |
Yeh PS version 2. I think we found $PSscriptroot a 3.0 thing. either just replace it with a dot or install the new window management framework 4 or 5. I think I'll change it to a dot anyway since it's already specific to is execution path. it's fancier than it needs to be. I've only got a phone I can't use an editor till Monday, who am @martyuk ? |
Maybe we should change to the below that does work on Powershell 2: Script:
Output:
|
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement Added running git for windows post-install.bat on first cmder launch fixed file/path not found errors when launching powershell as admin fixed file/path not found errors when launching bash/mintty as admin fixed PATH in vendor/cmder.sh Added sourcing ~/.bashrc if it exists. changed .gitignore to ignore anything with path of config/user-* removed my personal files from .gitignore, left in config/user-* Make sure $CMDER_ROOT does not have a trailing '/' %CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line Removed '\' from %CMDER_ROOT%
Ok sweet I got it compile and running, although a few things I've noticed. I noticed the vim issues are gone (sweet!) The mintty task has a black background, whereas others are more gray.
Nevermind that, I realized that the mintty task uses its own git home directory, therefor pointing to a different ctrl + v doesn't work for pasting into the mintty task.Normally with git bash, you can use The cmder icon is gone from the taskbar and the top of the window too.All I see is the conemu window. But this could have to do with the fact that I already had Cmder installed elsewhere. |
Hey Martin, I don't think there are any of bits like you suggested that Main things I added to the bash support were the ability use the native Git Biggest default user visible changes were organisation of the tasks menu Also the mintty tasks may be an issue for inclusion in cmder because they just work differently since they do not use the Windows Console API. If you want to leave them out I understand. On November 20, 2015 4:36:01 AM Martin Kemp [email protected] wrote:
|
@DanielGGordon because mintty.exe is a true terminal and does not use the windows console api what you are seeing is probably normal for 'mintty'. Simply hi-lighting copies and right click at the command line pastes. Mintty outside of cmder supports ctrl + insert to copy, and shift + insert to paste, maybe because it is being loaded inside cmder these keys are intercepted by cmder and never make it to Mintty. To add right click paste to minty add the following to your "%USERPROFILE%.mintyrc
Not sure what you mean by 'I realized that the mintty task uses its own git home directory, therefor pointing to a different git-prompt.sh' As for colors mintty colors can be configured but not through cmder again this is because it is not using the Windows Console API. This is done by editing the "%USERPROFILE%.mintyrc |
@DanielGGordon If you want to add the solarized dark palette to minty for a more pleasing scheme do the following for cmder to make it portable: NOTE: This only works if you are running my msys_bash branch, at least until it gets merged into the cmder project. From a bash/mintty shell:
See: https://github.com/karlin/mintty-colors-solarized |
Yea don't worry about that - I figured it out. I already have git bash, and was wondering why my git-prompty.sh script wasn't being loaded - and that's because it's outside of the Cmder build. As for the solarized theme - that seems to look nice. Good find. I will have to tweak it a little to my liking. I'll have to play around with I'm also a bit confused on what is going on here, sorry if this is out of the scope of this pull request. I am confused about mintty vs. git bash. What is the difference? To be honest, I don't know what I've been using this whole time (outside of Cmder) - actually I just looked, and I guess I've been using Mintty. So what is the difference between using that, and the When I go to my GIT folder in explorer, I see the options Lastly, the |
@DanielGGordon the difference between the bash::mintty and bash::bash tasks are the terminal/console used to interract with the system. I have eluded to this before. mintty is a true graphical terminal loading bash where the other is basically the windows cmd.exe loading bash using the windows console api. I believe ConEmu, the app behind cmder, was designed primarily to work with the windows console api but it can also integrate basic terminal apps like mintty and putty with some differences in functionality. As far as git bash vs. git cmd in your folder structure the first one uses the bash.exe(unix-ish) one uses cmd.exe(windows). In older git for windows it is the similar to bash::bash and cmd::cmder both using the Windows console API. In newer git for windows, what is in the development branch, it is the similar to bash::mintty and cmd::cmder. If you have been using mintty outside of cmder the issues you are having with vim and grey hi-lighting could be related to running vim under the windows console api and an incompatible vim colorscheme. Cmd.exe is only capable of displaying 16 colors while mintty can display many more. I see the same issues with vim in cmder not using mintty if I try to use a colorscheme like solarized.vim. What colorscheme are you running with vim? Try opening a standard Windows cmd.exe prompt and running vim using a fully qualified path to vim.exe. I am guessing you will see the same issue. Also from inside vim ':colorscheme default[enter]' will probably fix it temporarily. |
So I opened When I did that, I did get the same issue. However, when I open the same file, using the vim from my own git installation in My Also, I mentioned earlier about the Conemu icon showing up. Also the tasks don't have icons (not sure if this is intentional). and the top bar of Cmder: Also your explanation helps a lot, thank you. |
@DanielGGordon - The icons not showing are because when you build the development branch you are not building cmder.exe which is where the icons come from in the task definition. Has nothing to do with my branch just that you are not building that EXE, probably because you do not have the necessary tools to compile and it may even require a command line option. I have not looked. Your .vimrc may be setting a colorscheme or including a vim file that is setting a colorscheme. If I remove/comment all 'colorscheme ...' lines from my .vimrc it all works for me in all shells and issuing ':colorscheme' in vim returns 'default'. So nothing in the cmder development branch is changing the vim colorscheme from default. What do you get when you issue ':colorscheme' in vim? |
Issued |
@DanielGGordon - I don't know. The only variable I can see is the %userprofile%.vimrc and What if you launch vim from cmd.exe from your old cmder folder outside Can you post your .vimrc? Is 's 'set t_Co=256' in your .vimrc? I get Do you by chance have a _vimrc? echo $TERM from bash what do you get? Should be 'cygwin' in both cases. if you get 'xterm' or 'xterm-256color' that is your issue. On November 23, 2015 2:57:26 PM Daniel Gordon [email protected] wrote:
|
I don't have a
I actually don't have a version of Cmder installed where this is not an issue. Is there some other place besides Also I removed the |
Remove term=xterm from .vimrc. On November 23, 2015 4:12:15 PM Daniel Gordon [email protected] wrote:
|
Ah it was the
stuff in the file as well. Thanks for all your held @daxgames! It looks good now! Very happy to be using Cmder again (and with solarized!) |
35e161b
to
05b61d5
Compare
Glad to help. On November 23, 2015 4:38:12 PM Daniel Gordon [email protected] wrote:
|
@MartiUK - Checkout the docs I added to the README.md. I think that about covers what I did. Let me know if you need more/different. |
Perfect, thanks @daxgames |
Added support for MSys2 Bash.
Renamed cmd task to cmder.
Also added personal files to .gitignore so they never get uploaded to the repo.