diff options
Diffstat (limited to '')
| -rw-r--r-- | gotrc-examples/allow-uppercase | 17 | ||||
| -rw-r--r-- | gotrc-examples/lower-left-ponysay (renamed from gotrc) | 0 |
2 files changed, 17 insertions, 0 deletions
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 +} + diff --git a/gotrc b/gotrc-examples/lower-left-ponysay index 563790d..563790d 100644 --- a/gotrc +++ b/gotrc-examples/lower-left-ponysay |
