Skip to content

Commit

Permalink
Use portable syntax for pydoc function
Browse files Browse the repository at this point in the history
Make sure a pydoc alias isn't present to allow such function to be
defined
  • Loading branch information
Ivoz committed Sep 20, 2015
1 parent 45fbee2 commit 1682ed6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
26 changes: 13 additions & 13 deletions virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2033,19 +2033,19 @@ def convert(s):

##file activate.sh
ACTIVATE_SH = convert("""
eJytVNtu2kAQffdXDIaHJK2L6GMrqhIFCaQEopimaptqs9jjeCWzi+w1l0T59876AjYOqdTGD2Dv
zO6cPefMtGEWigQCESEs0kTDHCFN0Ie10CHYiUpjD2EuZJd7Wqy4RhvOglgtYM6T8Mxqw1al4HEp
lYY4lSA0+CJGT0dby/Kx3AUnp/BkAT2pTFCDE8By6yvPytbaEKNZVZEPKFciVnKBUsOKx4LPI0yy
LBFAC36B8wh254lNLy/Y7fhm9m1wya4Hs9E79mzDb/gMOkSZ5ZvHRPp2p5Ft7zJws1SxzhJ3aznG
xqYsHoi/gfkxG00no+nV8AikXbwBbBdpwtuFXgVZzyKoBb2ZyEmoUiLYR03yZPoBlz48JuF7WIfC
CyHkKwROfxTy1GJhwjrkOrNGcRQZxONRRBbRCh4IASlOb4GKzceSk4eKrckHgO9kI5XqIqyFfCiO
qSUagqBjKAYv5PIBE1iTH7lvfrZgvEVlySNLQo5+KQDRLw395wN35BDVjioWfrojdju8ccfTifOS
BNkFnRg+fun6uOrKNIpqhL0irts7oqrba8jp9po6ur1XBSzCJZA8pYwOJ7f7q7cMtp65Xh9sqaSP
iY5T0254AK8NLkYBlAmtAwCOCZV9WlZ/tqi187iIY4xwxWv9WOnsem3LqqDt24xVPhmzrYKH6pWs
RqMRk3mTFh+V7C5j5+MJmwyuhox9KtKqPbzDvW8GQxitWDVZK226ORT0SFMZWActeljKMsrl1syq
VG9/MXYH55dDdn0zvbqeNYx5aARTrXRQdqK92bOZn0GEQqsPmyN2bKbv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D036oxg/wDfTFtI
""")

##file activate.fish
Expand Down
9 changes: 6 additions & 3 deletions virtualenv_embedded/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ deactivate () {
# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH-}" -o -n "${ZSH_VERSION-}" ] ; then
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
hash -r 2>/dev/null
fi

Expand Down Expand Up @@ -62,13 +62,16 @@ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
export PS1
fi

function pydoc {
# Make sure to unalias pydoc if it's already there
alias pydoc 2>/dev/null >/dev/null && unalias pydoc

pydoc () {
exec python -m pydoc "$@"
}

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH-}" -o -n "${ZSH_VERSION-}" ] ; then
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
hash -r 2>/dev/null
fi

0 comments on commit 1682ed6

Please sign in to comment.