From 45f99ab7553e8a41d2339f117eec730fc2685f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 6 Nov 2018 11:45:13 +0700 Subject: [PATCH] Change the dig documentation (cherry picked from commit 7697923eab96870f9dc173e6f34344f726ae112b) --- bin/dig/dig.c | 6 ++++-- bin/dig/dig.docbook | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 39f74be3b3..4c34068992 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -193,8 +193,10 @@ help(void) { " +[no]fail (Don't try next server on SERVFAIL)\n" " +[no]header-only (Send query without a question section)\n" " +[no]identify (ID responders in short answers)\n" -" +[no]idnin (Parse IDN names)\n" -" +[no]idnout (Convert IDN response)\n" +#ifdef HAVE_LIBIDN2 +" +[no]idnin (Parse IDN names [default=on on tty])\n" +" +[no]idnout (Convert IDN response [default=on on tty])\n" +#endif " +[no]ignore (Don't revert to TCP for TC responses.)\n" " +[no]keepopen (Keep the TCP socket open between queries)\n" " +[no]mapped (Allow mapped IPv4 over IPv6)\n" diff --git a/bin/dig/dig.docbook b/bin/dig/dig.docbook index bd7510e38b..5996b37101 100644 --- a/bin/dig/dig.docbook +++ b/bin/dig/dig.docbook @@ -789,7 +789,13 @@ Process [do not process] IDN domain names on input. This requires IDN SUPPORT to have been enabled at - compile time. The default is to process IDN input. + compile time. + + + The default is to process IDN input when standard output + is a tty. The IDN processing on input is disabled when + dig output is redirected to files, pipes, and other + non-tty file descriptors. @@ -800,7 +806,13 @@ Convert [do not convert] puny code on output. This requires IDN SUPPORT to have been enabled at - compile time. The default is to convert output. + compile time. + + + The default is to process puny code on output when + standard output is a tty. The puny code processing on + output is disabled when dig output is redirected to + files, pipes, and other non-tty file descriptors.