diff options
author | Astound <kirito@disroot.org> | 2025-08-13 10:12:57 -0500 |
---|---|---|
committer | Astound <kirito@disroot.org> | 2025-08-13 10:12:57 -0500 |
commit | 20decfa42ab906e49b3f083ec7d5fb2910315c5d (patch) | |
tree | 4f83316438841be4d5104851fc49a0a9e217485a /hyperterm/core/status.sh | |
parent | a3c3eb4ea04906308349ab11d7fcd39a6674ca3c (diff) | |
download | hyperterm-20decfa42ab906e49b3f083ec7d5fb2910315c5d.tar.lz hyperterm-20decfa42ab906e49b3f083ec7d5fb2910315c5d.tar.xz hyperterm-20decfa42ab906e49b3f083ec7d5fb2910315c5d.zip |
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 } |