]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rename: detect tty in cbreak mode to make ask() read a single byte
authorG.raud Meyer <graud@gmx.com>
Thu, 29 Mar 2018 10:08:46 +0000 (12:08 +0200)
committerG.raud Meyer <graud@gmx.com>
Mon, 9 Apr 2018 15:21:16 +0000 (17:21 +0200)
commitf43bdedaa7334412aabefa62b8ae559b5b1d9e63
tree2aeef9ac7716da92dcf5fe6412a55a5d7dd6a93a
parent961b094629bebc481b50067b032f10efeb7f8863
rename: detect tty in cbreak mode to make ask() read a single byte

Set tty_cbreak only when tty has a VMIN of 1 to avoid having to purge at
all in cbreak mode.

The prompt is still compatible with a non interactive input from a pipe.
misc-utils/rename.c