diff options
Diffstat (limited to 'hyperterm/core/status.sh')
-rw-r--r-- | hyperterm/core/status.sh | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/hyperterm/core/status.sh b/hyperterm/core/status.sh index d5f5dc5..c9b0b64 100644 --- a/hyperterm/core/status.sh +++ b/hyperterm/core/status.sh @@ -1,25 +1,14 @@ #!/bin/bash # System Status -function exitstatus(){ - local retval=$? +function exitstatus() { + local retval=$1 unset status - - # Import colors _colors_bash "$@" case $retval in - 0) - status="[${retval}]" - printf '%b%s' "${BOLD}${CYAN}" "${status}" - ;; - 1) - status="[${retval}]" - printf '%b%s' "${BOLD}${PURPLE}" "${status}" - ;; - *) - status="[${retval}]" - printf '%b%s' "${BOLD}${RED}" "${status}" - ;; + 0) status="[${retval}]"; printf '%b%s' "${BOLD}${CYAN}" "${status}" ;; + 1) status="[${retval}]"; printf '%b%s' "${BOLD}${PURPLE}" "${status}" ;; + *) status="[${retval}]"; printf '%b%s' "${BOLD}${RED}" "${status}" ;; esac } |