[augeas-devel] Detect if stdin is a tty and make augtool's output quiet otherwise.

David Lutterkort lutter at redhat.com
Mon Mar 30 17:55:03 UTC 2009


Hi Raphael,

tanks for doing this .. I just noticed though that test-mv.sh now fails
because commands read from a file are echoed in the output and the test
can't filter them out anymore (it used to look for the 'augtool>'
prompt)

Come to think of it, we should probably bypass readline altogether when
reading commands from a file. The call to readline in main_loop should
be changed so that it uses getline(3) if we are not reading from a tty,
and we should also not call add_history at the end of main_loop.

David





More information about the augeas-devel mailing list