From 16740b0c7aa947fd43c227cb57af7dc12647173c Mon Sep 17 00:00:00 2001 From: "G.raud Meyer" Date: Mon, 2 Apr 2018 15:32:44 +0200 Subject: [PATCH] rename.1: describe interactive mode --- misc-utils/rename.1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/misc-utils/rename.1 b/misc-utils/rename.1 index fb8d4f621..1f6047920 100644 --- a/misc-utils/rename.1 +++ b/misc-utils/rename.1 @@ -83,6 +83,19 @@ permission to rewrite file names, the command will perform the action without any questions. For example, the result can be quite drastic when the command is run as root in the /lib directory. Always make a backup before running the command, unless you truly know what you are doing. +.SH INTERACTIVE MODE +As most standard utilities rename can be used with a terminal device (tty in +short) in canonical mode, where the line is buffered by the tty and you press +ENTER to validate the user input. If you put your tty in cbreak mode however, +rename requires only a single key press to answer the prompt. To set cbreak +mode, run for example: +.RS +.PP +.nf +sh -c 'stty -icanon min 1; "$0" "$@"; stty icanon' rename -i from to files +.fi +.PP +.RE .SH "EXIT STATUS" .RS .PD 0