欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

在msysGit的Git Bash里复制粘贴

程序员文章站 2022-03-11 14:53:19
...
在windows下用msysGit, 平时的工作一在Git Bash里命令行里搞定, 有时也用一下gitk.

但是在msysGit里有一个很令人不爽的特性,不能复制粘贴. 今天这个问题把我搞火了, 就把它解决算了.

因为在cygwin和ms的cmd里, 粘贴复制的鼠标操作都是可以的, 而就是msysGit不行, 我想肯定是哪里设置有问题.

在[url=http://*.com/questions/2304372/how-do-you-copy-and-paste-into-git-bash]Stack Overflow[/url]发现有个哥们和我碰到一样的问题, 原来是命令行的快速编辑” 选项的设置问题. 如果在windows命令行下做相关的鼠标操作, 必须打开此选项. 可能是msysGit把这个选项关了, 打开一试. 问题解决.

下面这段是微软的原文:

With QuickEdit mode, you can copy text between a command window and Windows-based programs, and you can also paste text into a command window by using a right-click operation. In Microsoft Windows 2000, QuickEdit and Insert mode are both enabled by default. In Windows XP, because these features are disabled by default, there is improved program compatibility with older MS-DOS-based programs that have included mouse support.


To enable QuickEdit mode in Windows XP:
Click Start, click Run, type cmd, and then click OK.
Click the icon in the upper-left corner of the Command Prompt window, and then click Properties.
On the Options tab, click to select the QuickEdit Mode and Insert Mode check boxes.
Click OK.
Click Save properties for future windows with same title, and then click OK.


转载自http://liuhui998.com/2010/09/26/msysgit_windows_copypaste/