mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
[autosudo plugin] fix pip at virtual_env
This commit is contained in:
parent
04ec2f024f
commit
c890c7ea0d
2 changed files with 17 additions and 4 deletions
|
|
@ -16,11 +16,16 @@ function clyde() {
|
|||
esac
|
||||
}
|
||||
|
||||
# special: virtual_env
|
||||
function pip() {
|
||||
case $1 in
|
||||
install | uninstall ) sudo pip $* ;;
|
||||
*) command pip $* ;;
|
||||
esac
|
||||
if [[ -n ${VIRTUAL_ENV+1} && -w $VIRTUAL_ENV ]] ; then
|
||||
command pip $*
|
||||
else
|
||||
case $1 in
|
||||
install | uninstall ) sudo pip $* ;;
|
||||
*) command pip $* ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
function npm() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue