]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/shell/bash/templates/bashrc.j2
Move bashrc temporary file to state dir
[perso/Immae/Config/Ansible.git] / roles / shell / bash / templates / bashrc.j2
index fff19f762624f64731767fdc92db6c4f8de0d8a4..91334b735225dc28871d9604e50295011dda5901 100644 (file)
@@ -2,7 +2,7 @@
 # ~/.bashrc
 #
 
-[[ -f "$HOME/.bashrc_temp" ]] && . $HOME/.bashrc_temp
+[[ -f "$XDG_STATE_HOME/bash/bashrc_temp" ]] && . $XDG_STATE_HOME/bash/bashrc_temp
 
 if [ -n "$HOME/.local/bin" ]; then
   PATH="$HOME/.local/bin:$PATH"
@@ -137,6 +137,8 @@ PS1='\[\033[01;31m\]$(error_code)\[\033[00;00m\]$(running_jobs)\[\033[01;32m\]$(
 PS1='\[\033[01;31m\]$(error_code)\[\033[00;00m\]$(running_jobs)\[$(git_prompt_color)\]$(git_prompt)\[\033[00;32m\]\u@\h\[\033[94m\] \w \$\[\033[00m\] '
 {% endif %}
 
+PROMPT_COMMAND="[[ -f "$XDG_STATE_HOME/bash/bashrc_temp" ]] && . $XDG_STATE_HOME/bash/bashrc_temp"
+
 {% if "nodejs" in features.get(profile, []) %}
 source /usr/share/nvm/init-nvm.sh
 {% endif %}