function set_window_title() { if [[ "${PWD}" == $PROJECTS_PATH/* ]]; then echo -ne "\033]0; Project: $(basename ${PWD}) \007" else echo -ne "\033]0; $LOCATION \007" fi } starship_precmd_user_func="set_window_title" eval "$(starship init bash)"