blob: b8d44ee195f1694a70a4b9bed9d309365f530fb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 6 Oct 2013 12:28:30 -0700
Origin: upstream, https://github.com/eggert/tz/commit/0f9614b
Subject: * tzselect.ksh (doselect): Prompt to stderr, not stdout.
(Thanks to Patrick 'P. J.' McDermott.)
---
diff --git a/tzselect.ksh b/tzselect.ksh
index 47c67bd..9d70691 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -119,7 +119,7 @@ else
for select_word
do
select_i=`expr $select_i + 1`
- printf "%${select_width}d) %s\\n" $select_i "$select_word"
+ printf >&2 "%${select_width}d) %s\\n" $select_i "$select_word"
done ;;
*[!0-9]*)
echo >&2 'Please enter a number in range.' ;;
@@ -133,7 +133,7 @@ else
esac
# Prompt and read input.
- printf %s >&2 "${PS3-#? }"
+ printf >&2 %s "${PS3-#? }"
read select_i || exit
done
}
|