commit db8ee8516f6cc2791fe357593e6881670bdd2871 parent 1b70648b54e116d587787efee32f7b2362335257 Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe> Date: Sun, 2 Jun 2024 13:33:54 -0500 bash: added print_goodbye at exit Diffstat:
| M | .bashrc | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/.bashrc b/.bashrc @@ -95,3 +95,12 @@ stopwatch() { PROMPT_COMMAND+=( '{ [ -z "$TMUX" ] && [[ $TERM != tmux-* ]] && [ "$ASCIINEMA_REC" != 1 ] && [ -n "$DISPLAY" -o -n "$TERMUX_VERSION" -o -n "$MSYSTEM" ]; } && { [ -z "$FIRST_COMMAND" ] && FIRST_COMMAND=1 || exit; }' ) + +print_goodbye() { + if [ -z "$TMUX" ] && { [ ! -z "$(dotfiles ls-files --others --exclude-standard --directory --no-empty-directory )" ] || ! dotfiles submodule foreach '[ -z "$(git ls-files --others --exclude-standard --directory --no-empty-directory)" ]'; }; then + dotfiles status -s + dotfiles submodule foreach 'git status -s' + read -n 1 + fi +} +trap print_goodbye EXIT