mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-10-16 11:40:46 +00:00
Compare commits
3 commits
d2b8022386
...
4b81c855da
Author | SHA1 | Date | |
---|---|---|---|
|
4b81c855da | ||
|
367e9381df | ||
|
2babe619a3 |
2 changed files with 8 additions and 4 deletions
|
@ -163,7 +163,7 @@ function git_current_branch() {
|
|||
}
|
||||
|
||||
# Outputs the name of the previously checked out branch
|
||||
# Usage example: git pull origin $(git_current_branch)
|
||||
# Usage example: git pull origin $(git_previous_branch)
|
||||
# rev-parse --symbolic-full-name @{-1} only prints if it is a branch
|
||||
function git_previous_branch() {
|
||||
local ref
|
||||
|
|
|
@ -8,10 +8,14 @@ function {
|
|||
/usr/share/bash-completion/completions/virtualenvwrapper \
|
||||
$HOME/.local/bin/virtualenvwrapper.sh
|
||||
do
|
||||
if [[ -f "$virtualenvwrapper" ]]; then
|
||||
source "$virtualenvwrapper"
|
||||
return
|
||||
if [[ -f "$virtualenvwrapper" ]]; then
|
||||
if [[ $VIRTUALENVWRAPPER_NO_LAZY -eq 1 ]] && [[ $(echo $virtualenvwrapper | grep lazy) ]]; then
|
||||
true
|
||||
else
|
||||
source "$virtualenvwrapper"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
done
|
||||
print "[oh-my-zsh] virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh.\n"\
|
||||
"Please install with \`pip install virtualenvwrapper\`" >&2
|
||||
|
|
Loading…
Reference in a new issue