Ver código fonte

Optionally source the docker stuff

Fred Damstra 4 anos atrás
pai
commit
622e751c69
1 arquivos alterados com 5 adições e 3 exclusões
  1. 5 3
      .bashrc

+ 5 - 3
.bashrc

@@ -61,9 +61,11 @@ fi
 
 if [ "$color_prompt" = yes ]; then
     #PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
-    #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[33m\]$(parse_git_branch)\[\033[00m\] \$ '
-    source /etc/bash_completion.d/docker-machine-prompt.bash
-    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[33m\]$(parse_git_branch)$(__docker_machine_ps1)\[\033[00m\] \$ '
+    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[33m\]$(parse_git_branch)\[\033[00m\] \$ '
+    if [[ -f /etc/bash_completion.d/docker-machine-prompt.bash ]]; then
+      source /etc/bash_completion.d/docker-machine-prompt.bash
+      PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[33m\]$(parse_git_branch)$(__docker_machine_ps1)\[\033[00m\] \$ '
+    fi
 
     # Also do color ls
     export CLICOLOR=true