$ bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)

Description:
        FEATURE REQUEST:
        when storing history, skip failed commands depending on exit status, 
controlled by a third option "ignorefailed" added to HISTCONTROL

        failed command lines stored in ~/.bash_history are mostly useless 
cluttering my bash history
        if a command failed due to a typo, and I issue a second, corrected 
version of the command line, it would be VERY nice, having ONLY the second 
version stored in bash history, NOT the failed first version

        if possible, should handle case (b) additionally to (a):
        (a)  use history facilities to reedit the failed command line
        (b)  retype corrected command line completely without unsing history 
facilities

        I tried PROMPT_COMMAND='PrStat=$?;SomeOtherCommands;if [ "$PrStat" == 
"0" ] ; then .. ' and similar, when bash executes this $PROMPT_COMMAND, $PrStat 
is ALWAYS empty, in addition $HISTCMD always empty .. I gave up.



_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to