擅长:python、mysql、java
<p>您的<code>bash</code>不是交互式的。在</p>
<p>来自<a href="http://linux.die.net/man/1/bash" rel="nofollow">^{<cd2>}</a>:</p>
<blockquote>
<p>Prompting</p>
<p>When executing interactively, bash displays the primary prompt PS1 when it is ready to read a command</p>
<p>Invocation</p>
<p><...> An interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)), or one started with the -i option.</p>
</blockquote>