diff options
Diffstat (limited to 'gotrc-examples/allow-uppercase')
| -rw-r--r-- | gotrc-examples/allow-uppercase | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gotrc-examples/allow-uppercase b/gotrc-examples/allow-uppercase index 17a86ce..a54c5f6 100644 --- a/gotrc-examples/allow-uppercase +++ b/gotrc-examples/allow-uppercase @@ -1,8 +1,6 @@ # -*- shell-script -*- -# The module allows you to use upper case letters when login in, however, arguments -# passed to external programs, like ssh, defined by the user in the login line -# will be converted to lower case. +# The module allows you to use upper case letters when login in. read_function_allow_uppercase=$read_function @@ -11,7 +9,14 @@ read_function=_read_allow_uppercase function _read_allow_uppercase { $read_function_allow_uppercase - lower="$(sed -e 'y/QWERTYUIOPASDFGHJKLZXCVBNM/qwertyuiopasdfghjklzxcvbnm' <<< "${user}")" + lower="" + for word in $user; do + if [ ! "${word::1}" = "-" ]; then # this check is done so ssh arguments are not made into lower case + word="$(sed -e 'y/QWERTYUIOPASDFGHJKLZXCVBNM/qwertyuiopasdfghjklzxcvbnm/' <<< "${word}")" + fi + lower="${lower} ${word}" + done + lower="${lower:1}" 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. |
