On Tue, Mar 30, 2010 at 8:15 PM, Greg Wooledge <wool...@eeg.ccf.org> wrote:
> On Tue, Mar 30, 2010 at 02:36:59PM +0800, Clark J. Wang wrote: > > After some investigation I could stably reproduce this > > problem by following steps (tested with bash 3.1.17, 3.2.39 and 4.1.0): > > > > bash$ alias xx='echo 142857' ### Make sure there isn't an external cmd > > named `xx' > > bash$ export EDITOR=vi > > bash$ set -o vi > > bash$ ### Press ESC to get out of vi's INSERT mode > > bash$ ### Press v to invoke vi to input a cmd like `ls', save and > exit, > > the `ls' cmd runs. > > bash$ xx > > -bash: xx: command not found > > bash$ xx > > 142857 > > Hmm... yes, I can reproduce that. After going into vi (by pressing 'v') > and running a command edited therein, bash remains in "command mode" > instead of going back to "insert mode". I have to hit Enter or Ctrl-c or > 'i' before I can type normally again. > > In order to reproduce your result, on the second to last bash$ prompt, > I would have to press something like 'ixx' or 'axx'. You're right. That's also what I did. > However, if I press > Enter and then 'xx', or Ctrl-C and then 'xx', I do _not_ get your result. > > Tested in 3.2.39(1)-release and 4.1.2(2)-release. >