diff --git a/bashrc b/bashrc index e2bebb3..3d77ef8 100644 --- a/bashrc +++ b/bashrc @@ -167,6 +167,12 @@ function calculate_git_alignment() { # Set up prompt command to draw divider, update git status, and calculate alignment PROMPT_COMMAND="draw_prompt_divider; my_gitstatus_prompt_update; calculate_git_alignment" +# Custom command_not_found_handle function to show errors in red +command_not_found_handle() { + echo -e "\033[01;31mbash: $1: command not found\033[00m" >&2 + return 127 +} + # Set PS1 with user@host, directory on first line, dynamically aligned git status, prompt on third line PS1='\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[1;34m\]\w\[\033[00m\]\n${GITSTATUS_PROMPT:+$GIT_ALIGNMENT_PADDING$GITSTATUS_PROMPT\n}└── \[\033[01;$((31+!$?))m\]\$\[\033[00m\] \[\e]0;\u@\h: \w\a\]'