From 493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 30 Sep 2013 07:36:48 +0200 Subject: add another example rc file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- gotrc-examples/allow-uppercase | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gotrc-examples/allow-uppercase (limited to 'gotrc-examples/allow-uppercase') diff --git a/gotrc-examples/allow-uppercase b/gotrc-examples/allow-uppercase new file mode 100644 index 0000000..858fee0 --- /dev/null +++ b/gotrc-examples/allow-uppercase @@ -0,0 +1,17 @@ +# -*- shell-script -*- + + +read_function_allow_uppercase=$read_function +read_function=_read_allow_uppercase + +function _read_allow_uppercase +{ + $read_function_allow_uppercase + lower="$(sed -e 'y/QWERTYUIOPASDFGHJKLZXCVBNM/qwertyuiopasdfghjklzxcvbnm' <<< "${user}")" + if [ ! "${lower}" = "${user}" ]; then + #stty olcuc ## Uncomment this if you want to go old-school Unix, too bad + ## it will break colours and only uppercases ASCII letters. + user="${lower}" + fi +} + -- cgit v1.2.3-70-g09d2