[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash sometimes cannot find aliases
From: |
Chet Ramey |
Subject: |
Re: Bash sometimes cannot find aliases |
Date: |
Tue, 30 Mar 2010 23:30:23 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
On 3/30/10 2:36 AM, Clark J. Wang wrote:
> Good news:
>
> I met this problem again a few minutes ago. Then I looked back to find out
> what I was doing. 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
> bash$
Thanks for the report. This was exactly what I needed. The fix will be
in the next release of bash. I've attached a patch for the curious or
impatient.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
edit-parser-state
Description: Text document