]> 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 2018f55754c0403db7785e5758fc06aa982c9615..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"
@@ -29,6 +29,8 @@ alias rm="rm -i"
 alias psp="pstree -aUp $USER"
 alias dotdrop="dotdrop --cfg $XDG_CONFIG_HOME/dotdrop/config.yaml"
 
+[[ -f /usr/share/stgit/completion/stgit-completion.bash ]] && . /usr/share/stgit/completion/stgit-completion.bash
+
 {% if role.get(profile) == "fretlink" %}
 ##### Some Fretlink aliases
 alias getDump='s3cmd -c <(pass show Travail/Fretlink/S3) get '
@@ -135,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 %}