LP#1152272: do not log batch invocation of srfsh in .srfsh_history user/gmcharlt/lp1152272_keep_batch_srfsh_out_of_history
authorGalen Charlton <gmc@esilibrary.com>
Wed, 3 Jun 2015 18:35:35 +0000 (18:35 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 3 Jun 2015 18:35:35 +0000 (18:35 +0000)
commite59fabbf03d7d06bbadb90468383f5be62c3dc43
tree1032afb621692ff01436dd58f0c5329a6abb5c22
parent42f14c919d82abbf5927775b933ff8c5d4070d2e
LP#1152272: do not log batch invocation of srfsh in .srfsh_history

When running srfsh to process a script, do not log
the requests in .srfsh_history.

To test
-------
[1] Run the following command:

    echo 'request opensrf.math opensrf.system.echo "foo"' | srfsh

[2] Note that the last line of ~/.srfsh_history should be
    'request opensrf.math opensrf.system.echo "foo"'

[3] Apply the patch, compile, and run

    echo 'request opensrf.math opensrf.system.echo "bar"' | srfsh

[4] This time, no additional line should have been added to
    ~/.srfsh_history

[5] Another variation to try:

    srfsh test.srfsh

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
src/srfsh/srfsh.c