Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/bin/sh



Module Name:    src
Committed By:   aymeric
Date:           Mon Mar  6 00:09:22 UTC 2006

Modified Files:
        src/bin/sh: histedit.c

Log Message:
Make the -s flag of fc work correctly. Ensure that only one command is specified
and ensure that we break out of the loop after executing it.
With the previous code, because the re-executed command was added to the
history, it would think that it still had to execute it, leading to an infinite
loop.

The last thing which differs from ksh is that we get the "fc -s " command into
the history, but this is actually rather a feature in my humble opinion.

To test:
$ echo hello
$ fc -s ec
<infinite loop or correct behaviour>


To generate a diff of this commit:
cvs rdiff -r1.37 -r1.38 src/bin/sh/histedit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index