diff options
Diffstat (limited to 'gotrc-examples/hide-username')
| -rw-r--r-- | gotrc-examples/hide-username | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gotrc-examples/hide-username b/gotrc-examples/hide-username index 05d670f..798fa34 100644 --- a/gotrc-examples/hide-username +++ b/gotrc-examples/hide-username @@ -2,7 +2,7 @@ # gates-of-tartaros – Minimal replacement for agetty with SSH support # -# Copyright © 2013, 2014, 2015 Mattias Andrée (maandree@member.fsf.org) +# Copyright © 2013, 2014, 2015 Mattias Andrée (m@maandree.se) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,25 +28,22 @@ read_function_hide_username=$read_function read_function=_read_hide_username -_read_hide_username () -{ - local _read_tty_settings - _read_tty_settings="$(stty --save)" - stty -echo - - $read_function_hide_username - - stty "${_read_tty_settings}" - echo +_read_hide_username () { + local _read_tty_settings + _read_tty_settings="$(stty --save)" + stty -echo + + $read_function_hide_username + + stty "${_read_tty_settings}" + printf '\n' } # If you use GNU Bash for gates-of-tartaros, # you can use this instead: -# _read () -# { -# read -s user -# echo +# _read () { +# read -s user +# echo # } - |
