Skip to content

Commit 043d215

Browse files
committed
Fixing run_hook and tab_completion
Signed-off-by: Jason Myers <[email protected]>
1 parent 6b9b7dc commit 043d215

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

virtualenvwrapper.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function virtualenvwrapper_run_hook {
228228
( \
229229
virtualenvwrapper_cd "$WORKON_HOME" &&
230230
"$VIRTUALENVWRAPPER_PYTHON" -m 'virtualenvwrapper.hook_loader' \
231-
$HOOK_VERBOSE_OPTION --script "$hook_script" "$@" \
231+
${HOOK_VERBOSE_OPTION:-} --script "$hook_script" "$@" \
232232
)
233233
result=$?
234234

@@ -260,7 +260,7 @@ EOF
260260
# Set up tab completion. (Adapted from Arthur Koziel's version at
261261
# http://arthurkoziel.com/2008/10/11/virtualenvwrapper-bash-completion/)
262262
function virtualenvwrapper_setup_tab_completion {
263-
if [ -n "$BASH" ] ; then
263+
if [ -n "${BASH:-}" ] ; then
264264
_virtualenvs () {
265265
local cur="${COMP_WORDS[COMP_CWORD]}"
266266
COMPREPLY=( $(compgen -W "`virtualenvwrapper_show_workon_options`" -- ${cur}) )

0 commit comments

Comments
 (0)