[英]How to overcome going futher down in git Bash
I just went to commit using git bash. 我只是使用git bash提交。 Before type anything accidentally typed character ' and press Enter key.
在键入任何意外键入字符之前,请按Enter键。
Unfortunately, I can not exit the editor it keeps going further down when I typed something and press Enter. 不幸的是,我无法退出编辑器,当我键入某些内容并按Enter时,它会继续下降。 I tried Exit, Clear everything.
我尝试退出,清除所有内容。
Anyone can help me please. 任何人都可以帮助我。
Thanks for reading. 谢谢阅读。
You can type Ctrl + C to kill the process. 您可以按Ctrl + C终止该进程。 Follow this link to see how it works
点击此链接查看其工作原理
Ctrl+C is a map to the kill command.
Ctrl + C是kill命令的映射。 When you press them, kill sends a SIGINT signal, that's interrupts the process.
当您按下它们时,kill会发送SIGINT信号,这会中断该过程。
You can also type another '
to "fix" your issue. 您也可以输入另一个
'
来“修复”您的问题。 Read this link to understand how quoting is treated in bash 阅读此链接以了解如何在bash中处理报价
Strong quoting
强力报价
Strong quoting is very easy to explain:
强引用很容易解释:
Inside a single-quoted string nothing(!!!!) is interpreted, except the single-quote that closes the quoting.
在单引号字符串中,除了关闭引号的单引号外,什么都不会解释。
echo 'Your PATH is: $PATH' That $PATH won't be expanded, it's interpreted as normal ordinary text, because it's surrounded by strong quotes.
echo'您的PATH是:$ PATH'$ PATH不会被扩展,它被解释为普通的普通文本,因为它被强引号包围。 In practise that means, to produce a text like Here's my test… as a single-quoted string, you have to leave and re-enter the single-quoting to get the character "'" as literal text: # WRONG echo 'Here's my test...'
在实践中,这意味着要生成像“这就是我的测试”这样的文本……作为单引号字符串,您必须离开并重新输入单引号才能将字符“'”作为文字文本:#WRONG echo'这是我的测试...'
RIGHT echo 'Here'\\''s my test...'
正确的回声'这是我的测试...'
ALTERNATIVE: It's also possible to mix-and-match quotes for readability: echo "Here's my test"
替代:也可以混合使用引号来提高可读性:echo“ Here's my test”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.