diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-09-30 07:36:48 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-09-30 07:37:04 +0200 |
| commit | 493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c (patch) | |
| tree | e49682dbef33abe090acf5987cb8694d518b6d1e /gotrc-examples/allow-uppercase | |
| parent | separate username reading and logging in (diff) | |
| download | gates-of-tartaros-493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c.tar.gz gates-of-tartaros-493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c.tar.bz2 gates-of-tartaros-493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c.tar.xz | |
add another example rc file
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'gotrc-examples/allow-uppercase')
| -rw-r--r-- | gotrc-examples/allow-uppercase | 17 |
1 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 +} + |
