diff --git a/etc/bash.bashrc b/etc/bash.bashrc index 4479187..a294542 100644 --- a/etc/bash.bashrc +++ b/etc/bash.bashrc @@ -209,12 +209,15 @@ alias ssu='ss -tupn' # the miaou-bash helper function function miaou-bash { - if "$MIAOU_BASH_DIR"/bin/miaou-bash "$@"; then + "$MIAOU_BASH_DIR"/bin/miaou-bash "$@" + local code=$? + if [[ "$code" == 0 ]]; then if [[ "${1:-}" =~ --self-upgrade|--uninstall ]]; then echo 'reloading session now!' exec bash -l fi fi + return $code } # BASH COMPLETIONS