Git Bash 不让我输入任何内容,只显示一个闪烁的光标
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28073577/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git Bash won't let me type anything, just shows a blinking cursor
提问by Jeffery Jones
I'm not able to type any characters at the Git-Bash command line; all it shows is a blinking cursor. Git Bash was working fine yesterday, but I'm not able to do anything on it now. What can I do to fix this?
我无法在 Git-Bash 命令行中输入任何字符;它显示的只是一个闪烁的光标。Git Bash 昨天运行良好,但我现在无法对其进行任何操作。我能做些什么来解决这个问题?
回答by SherylHohman
I found the answer to a problem with similar symptoms. I'll include it here for someone who finds this page looking for an answer, as I did.
我找到了具有类似症状的问题的答案。我会把它包括在这里,供那些找到此页面寻找答案的人使用,就像我一样。
In my case, the cursor didn't move, or show my typing onscreen.
However, it actually executed the command (if I pressed Enter
), even though it lookedlike I didn't type anything in!
就我而言,光标没有移动,也没有在屏幕上显示我的输入。
但是,它实际上执行了命令(如果我按下了Enter
),即使看起来我没有输入任何内容!
The solution was to type reset
< Enter >
解决方案是输入reset
< Enter >
Turns out it can be an issue for any shell program (cmd, git bash, etc), not necessarily just a Git Bash issue.
It looks like Ctrl-C
or Ctrl-Z
can occasionally result in the terminal not echoing commands to the screen, depending on what process was running at the time it was killed.
事实证明,它可能是任何 shell 程序(cmd、git bash 等)的问题,不一定只是 Git Bash 问题。
它看起来Ctrl-C
或Ctrl-Z
偶尔会导致终端不向屏幕回显命令,这取决于它被杀死时正在运行的进程。
reset
restores it.
reset
恢复它。
I found the solution, and the explanation why, at https://askubuntu.com/a/172747/636571
我在https://askubuntu.com/a/172747/636571找到了解决方案和原因
回答by Zormi
I have a similar problem, I can type commands and it will execute them, but I cannot see what I type.
And the solution that works for me is to type q
< Enter > and it back to normal.
我有一个类似的问题,我可以输入命令并执行它们,但我看不到我输入的内容。对我有用的解决方案是键入q
< Enter > 并恢复正常。
回答by Punit Tiwari
Kill the server with CTRL+cin the command prompt window.
在命令提示符窗口中用CTRL+杀死服务器c。
回答by Our Better Life
reset (enter) is the solution for your cursor not blinking.
reset (enter) 是光标不闪烁的解决方案。
回答by Astro Boys
Right click on the mouse will show you the short cut. In my case working with git-bash
右键单击鼠标将显示快捷方式。在我的情况下使用 git-bash
ctrl + insert to copy
and shift + insert to paste
回答by Mohamed Foad
I know this is may be late, but in case someone do like what happens with me. because closing visualize window solved cursor blink.
我知道这可能会迟到,但万一有人喜欢我发生的事情。因为关闭可视化窗口解决了光标闪烁。
What happened?
发生了什么?
I wrote a command -gitk which is used to visualize Git ( Great feature )
我写了一个命令 -gitk 用于可视化 Git(很棒的功能)
Then I tried to use git bash after while,I found only this blinking cursor. I tried many times to reset or even close it; however closing it caused an error so I got afraid of losing my work.
然后我尝试使用 git bash 一段时间后,我发现只有这个闪烁的光标。我多次尝试重置甚至关闭它;但是关闭它会导致错误,所以我害怕丢失我的工作。
I closed the gitk visualize window and then Git bash restored as usual.
我关闭了 gitk 可视化窗口,然后 Git bash 照常恢复。
Link to gitk https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Graphical-Interfaces
gitk 链接https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Graphical-Interfaces