Skip to content

Commit 78729b0

Browse files
committed
fix virtualenvwrapper_show_workon_options to use find again
1 parent d7d6b07 commit 78729b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

virtualenvwrapper_bashrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ function rmvirtualenv () {
126126
# List the available environments.
127127
function virtualenvwrapper_show_workon_options () {
128128
virtualenvwrapper_verify_workon_home || return 1
129-
(cd "$WORKON_HOME"; ls */bin/activate) | sed 's|/bin/activate||' | sort
129+
# NOTE: DO NOT use ls here because colorized versions spew control characters
130+
# into the output list.
131+
(cd "$WORKON_HOME"; find -L . -path '*/bin/activate') | sed 's|^\./||' | sed 's|/bin/activate||' | sort
130132
}
131133

132134
# List or change working virtual environments

0 commit comments

Comments
 (0)