local colour=
local ret=
for colour in "${1}_colour${__ps1_colours}" "${1}_colour"; do
- ret=$(eval echo -n "\$$colour")
+ eval "export ret=\$$colour"
[ -n "$ret" ] && break
done
echo -n $ret
function __ps1_prefix() {
local var=\$${2#\$}
local prefix=${__ps1_all%$var*}
- local all="$(eval echo $prefix)"
+ eval "all=\$$prefix"
[ "${all/1/}" = "$all" ] || echo -n " "
return $1
}
fi
what="$(echo $2 | env LANG= LC_ALL= LC_CTYPE= tr '[:upper:]' '[:lower:]')"
- eval __ps1_$what=$action
+ eval "__ps1_$what=$action"
}
__ps1