1
0
mirror of https://github.com/octoleo/Purse.git synced 2024-06-01 22:20:47 +00:00

Style cleanup

This commit is contained in:
drduh 2015-07-03 13:05:06 -04:00
parent e3a3c78464
commit 4ddbc34b96

11
pwd.sh
View File

@ -26,21 +26,20 @@ get_pass () {
while IFS= read -p "${prompt}" -r -s -n 1 char ; do while IFS= read -p "${prompt}" -r -s -n 1 char ; do
if [[ ${char} == $'\0' ]] ; then if [[ ${char} == $'\0' ]] ; then
break break
fi elif [[ ${char} == $'\177' ]] ; then
if [[ ${char} == $'\177' ]]; then if [[ -z "${password}" ]] ; then
if [[ -z "${password}" ]]; then prompt=""
prompt=''
else else
prompt=$'\b \b' prompt=$'\b \b'
password="${password%?}" password="${password%?}"
fi fi
else else
prompt='*' prompt="*"
password+="${char}" password+="${char}"
fi fi
done done
if [ -z ${password+x} ] ; then if [[ -z ${password} ]] ; then
fail "No password provided" fail "No password provided"
fi fi
} }