Lullabot / trusty32-lamp

An Ubuntu 14.04 VM for PHP with built in profiling
GNU General Public License v3.0
32 stars 10 forks source link

Git branch #47

Closed mtift closed 6 years ago

mtift commented 6 years ago

When I vagrant ssh into my machine that uses the supplied oh-my-xsh theme (ZSH_THEME="superjarin", or any other theme for that matter) I don't see a git branch on the prompt. For example, I just see this:

[] /vagrant/www/docroot 

If I add something like this to my ~/.zshrc:

autoload -Uz vcs_info
precmd () { vcs_info }
setopt prompt_subst
PS1="\$vcs_info_msg_0_$PS1"

Then I see this in my prompt:

 (git)-[master]-[] /vagrant/www/docroot

Should I see git branches using the project with the default setup?

deviantintegral commented 6 years ago

Interesting. I wonder if it's a bug because dirty file tracking is disabled. Also, the theme should be the default of robbyrussell. I wonder how yours got there?

deviantintegral commented 6 years ago

So you have to add the git-prompt plugin to get it to be added by default. However, that slows down any prompt displays for a mounted /var/www/docroot pretty significantly, so I removed it (a long) time ago. Do you think displaying the branch by itself is worth it? For me, I'm almost always working from outside the VM for git operations.

q0rban commented 6 years ago

For me, I'm almost always working from outside the VM for git operations.

/me too.

mtift commented 6 years ago

Thanks for the feedback. It sounds like the answer to my question is "no."

I haven't done any git operations in the VM, either. I have just noticed that I've been typing git branch when I'm in the VM, troubleshooting problems, including making sure I'm on the right branch.

mtift commented 6 years ago

Oh, and yes, I meant "robbyrussell."