I am mostly using 'git-bash' which came with the Windows install of Git vcs. I think it is the same one that comes with Cygwin. It works fine technically but the UI sucks:

  • have to right-click the title bar and go to Properties to change the window width
  • most annoyingly... copy and paste and highlight with the mouse are equally cumbersome

In contrast, the Terminal app that comes with OS X manages these with aplomb and makes it so much more comfortable to work with. You can even drag and drop a file on it and it will paste the file path in at your cursor!

I have also tried:

  • http://sourceforge.net/projects/win-bash
  • http://www.steve.org.uk/Software/bash/
  • http://www.hamiltonlabs.com/cshell.htm

None of these do copy and paste of text without cumbersome right-clicking.

I am specifically looking for a Unix-flavoured shell in Windows so I don't have to use different shells between my home dev (Windows), the live server (Linux) or dev at the office (Mac).

Yes I have Googled and haven't found one yet...

link|improve this question
3  
For any console in Windows, including cygwin bash, you can enable quick-edit and it's better than the default behavior. Since you didn't describe what you are finding cumbersome, I don't know if you tried that. – mfinni Jan 10 '11 at 18:56
Actually I think Git-Bash runs on MSYS from MinGW rather than Cygwin per se... nonetheless having just installed each of them separately the shell app that comes with Cygwin seems to be identical to the one in MSYS, which is the same as the one that comes with Git. – Anentropic Jan 10 '11 at 19:08
@mfinni thanks, I hadn't tried 'quick edit' mode. However it's still pretty clunky and you can't do copy and paste as easily as in a normal program... – Anentropic Jan 10 '11 at 19:10
QuckEdit is close to PuTTY/X's copy/paste: highlight text and hit enter to copy, then right click to paste. – DerfK Jan 10 '11 at 19:32
You should be aware (I can't tell for sure if you are) that terminals and shells are distinct and largely independent of each other. – Dennis Williamson Jan 11 '11 at 1:32
show 2 more comments
feedback

4 Answers

up vote 8 down vote accepted

Have you tried console2?

It lets you use cmd, bash, or any program as your shell, and allows resizing in any direction.

You can make it default to Git Bash by going to Edit->Settings, then pasting this in the Shell field:

"C:\Program Files\Git\bin\sh.exe" --login -i"

To copy, hold Shift, click and drag with the left mouse button to select, then left click to Copy.

Finally, Git ships with rxvt. You could create a new Windows shortcut with the Target field set to:

"C:\Program Files\Git\bin\rxvt.exe" -e /bin/sh --login -i
link|improve this answer
Great tip - I had tried Console2 but had no idea I could change the underlying shell! – Anentropic Jan 18 '11 at 10:06
feedback

[Reposting my comment as an answer at Anentropic's request.]

If you're using Cygwin and like PuTTY, check out mintty. It's available in the Shells category in the Cygwin setup program (or get the source here). The author used large parts of PuTTY to create it, so it behaves very much like PuTTY. It can be configured to work like you'd like it to:

  • Resize the window just by dragging the edges or corners, like any other Windows app. This will resize the terminal by add or removing rows and/or columns, like you'd expect from something like xterm.
  • Copy/paste can be configured as single-click operations (e.g. left click to highlight and auto-copy, right click to extend, middle click to paste).
  • As with OS X Terminal, dragging a file or folder into a mintty window will paste the full path at the cursor position.
  • All Windows drives are available, "mounted" by default under /cygdrive (though I usually change this to /mnt with mount -c /mnt).

My only problem with mintty is that recent versions (0.9.4+) seem to be doing something that Windows 7 UAC doesn't like, so it prompts for permission to run it every time. This seems to cause it to run with different privileges, so things like my network drives don't work. I don't know if this is a mintty problem, or a problem with my system, though.

link|improve this answer
I don't have this problem under Windows 7, so it's most likely a problem with your system. I second the use of Mintty which also supports all those nice new Windows shortcuts to move windows around (Windows key + arrows) – Renik Jan 17 '11 at 22:17
This is great - do you know if it's possible to point it to use the shell that comes with Git (like @Mikel's tip for Console2)? – Anentropic Jan 18 '11 at 10:13
By default, mintty will invoke whatever your $SHELL environment variable points to. However, you can instead specify another program as the first argument on the command line, which can be useful in shortcuts. The author has put together a nice list of tips (code.google.com/p/mintty/wiki/Tips) that show how you can do this. – James Sneeringer Jan 18 '11 at 15:31
feedback

I wish that PuTTY was able to work as an emulator for local OS access like Cygwin does. PuTTY is my favorite when I am stuck on a Windows box. I voted this question up, I would love to know about a better emulator for Windows as well.

link|improve this answer
1  
Putty is a terminal program, not a shell. Even if you could use putty to connect to your local Windows box (which you can, if it's running a SSH daemon), the actual shell is still whatever shell you're running when you login via SSH. – mfinni Jan 10 '11 at 19:16
I did not say it was a shell, I said I wish it worked like an emulator. I like the GUI on putty, that was my point. – c1tadel1 Jan 10 '11 at 19:28
3  
If you're using Cygwin and like PuTTY, check out mintty. It's available in the Shells category in the Cygwin setup program (or check the source at code.google.com/p/mintty). The author used large parts of PuTTY to create it, so it behaves very much like PuTTY. – James Sneeringer Jan 10 '11 at 19:59
@James do you want to post your mintty suggestion as an answer? It looks promising! I seem to be stuck in the Cygwin virtual unix filesystem though, I can't browse my Windows files like I can in git-bash? – Anentropic Jan 17 '11 at 17:27
feedback

The big problem with copy and paste isn't fault of the terminal emulators; it's the keybinding themselves.

When the shortcuts were invented in Mac, Apple added a new key for them: the 'command key' (also known as 'splat') It doesn't have an ASCII equivalent.

A few years later, when Microsoft copied the same shortcuts, PC keyboards didn't have any 'windows', or 'menu' keys, so they went with another little used key you could hold with your pinky: the Ctrl key. Problem is, that Ctrl-C, Ctrl-V, etc. are valid ASCII codes, and heavily used on command line interfaces.

So, when you press Ctrl-C on a Windows ternimal, should it copy the text or break the running command?

link|improve this answer
That's a good point, I hadn't realised OS X had a lucky advantage there. Still, this is a UI issue that the current terminal apps for Windows haven't really attempted to solve. – Anentropic Jan 17 '11 at 17:16
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.