chuli wrote:
Hi,
For bash-3.1 and bash-3.2, I write a script a.sh like this:
Test(){
history abc
echo "FAIL"
}
Test
Execute "bash a.sh", and "FAIL" can't be printed. Why should 'history' be
designed like this?
I think it's better to continue execute the next command even if history is fail.
(it seems "history abc" will use "get_numeric_arg" which calls "jump_top_level", so "echo FAIL" can't be executed)
I agree. `history' with an invalid numeric argument aborts the current
top-level command, which in this case is the function call. It should
be less aggressive about such failures. The behavior will change in
bash-4.0.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/