21 lines
460 B
Plaintext
21 lines
460 B
Plaintext
|
|
||
|
# direnv
|
||
|
_direnv_hook() {
|
||
|
local previous_exit_status=$?;
|
||
|
trap -- '' SIGINT;
|
||
|
eval "$("/usr/bin/direnv" export bash)";
|
||
|
trap - SIGINT;
|
||
|
return $previous_exit_status;
|
||
|
};
|
||
|
if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then
|
||
|
PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
|
||
|
fi
|
||
|
|
||
|
# starship
|
||
|
function set_win_title(){
|
||
|
echo -ne "\033]0; $(basename "$PWD") \007"
|
||
|
}
|
||
|
starship_precmd_user_func="set_win_title"
|
||
|
|
||
|
eval "$(starship init bash)"
|