[英]Remove extra new line from cygwin command line
After opening the cygwin in windows we can see the current user and path in one line and the next command need to type in the next line. 在windows中打开cygwin后,我们可以在一行中看到当前用户和路径,下一行命令需要输入下一行。
user@mycomputer /cygdrive/e/folder
$ |
Every time when I press the enter key it will go down by two line 每次按下回车键时,它都会下降两行
user@mycomputer /cygdrive/e/folder
$
user@mycomputer /cygdrive/e/folder
$
user@mycomputer /cygdrive/e/folder
$
user@mycomputer /cygdrive/e/folder
$ |
What I need to do is remove that extra line and same like windows command prompt next command need to type in-front (or end) of the first line. 我需要做的是删除额外的行,像windows命令提示符下一个命令需要输入第一行的前面(或结束)。 Something like this
像这样的东西
C:\Users\myname>_
So even I press enter key multiple times cursor only jump one line per time. 所以,即使我多次按回车键,光标每次只跳一行。
C:\Users\myname>
C:\Users\myname>
C:\Users\myname>
C:\Users\myname>
Is this possible to achieve? 这有可能实现吗?
Your prompt contains a newline. 您的提示包含换行符。 Remove the
\\n
from PS1
. 从
PS1
删除\\n
。
Search through your startup files ( .profile
, .bashrc
etc.) where the variable is assigned to and make the change permanent there. 搜索分配了变量的启动文件(
.profile
, .bashrc
等)并在其中进行永久更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.