[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] Make augtool quiet in batch mode.




This patch makes augtool silent in batch mode, i.e. when stdin is a tty.
In order to avoid printing the prompt in batch mode, it uses getline in
this case.

cleanpath() has been refactored into a wrapper to a cleanstr() function
to make remove trailing newlines and spaces from the line grasped from
getline, which is not done automatically contrarily to readline.

This patch makes augtest output series of "Unknown command '\n'", but
all tests pass. I cannot reproduce this error by sending empty lines to
augtool in the shell, either with 'echo -e "command\ncommand" |' or 'cat <<EOF |'.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]