如何克服在 git Bash 中进一步下降的问题
How to overcome going futher down in git Bash
我刚刚使用 git bash 提交。在键入任何不小心键入的字符 ' 并按 Enter 键之前。
不幸的是,我无法退出编辑器,当我输入内容并按 Enter 时,它会继续向下移动。我试过退出,清除所有内容。
任何人都可以帮助我。
感谢阅读。
您可以键入 Ctrl + C 终止进程。关注 this link 看看它是如何工作的
Ctrl+C is a map to the kill command. When you press them, kill sends a
SIGINT signal, that's interrupts the process.
您还可以输入另一个 '
来 "fix" 您的问题。阅读 this link 以了解如何在 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. 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...'
RIGHT echo 'Here'\''s my test...'
ALTERNATIVE: It's also possible to mix-and-match quotes for readability: echo "Here's my test"
我刚刚使用 git bash 提交。在键入任何不小心键入的字符 ' 并按 Enter 键之前。
不幸的是,我无法退出编辑器,当我输入内容并按 Enter 时,它会继续向下移动。我试过退出,清除所有内容。
任何人都可以帮助我。
感谢阅读。
您可以键入 Ctrl + C 终止进程。关注 this link 看看它是如何工作的
Ctrl+C is a map to the kill command. When you press them, kill sends a SIGINT signal, that's interrupts the process.
您还可以输入另一个 '
来 "fix" 您的问题。阅读 this link 以了解如何在 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. 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...'
RIGHT echo 'Here'\''s my test...'
ALTERNATIVE: It's also possible to mix-and-match quotes for readability: echo "Here's my test"