Commit e0d3f432 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Reduce number of subshells spawned in pydevenv*

parent fb841c52
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -6,20 +6,18 @@ SOURCED_VIRTUALENV_FUNCS=yes
has splitpaths || return


_venv_glob_path() {
_venv_glob_path() (
	local dir pattern
	splitpaths "$PATH" | while read -r dir; do
		for pattern in "$@"; do
			(
	case $CURRENT_SHELL in
		bash) shopt -u failglob; shopt -s nullglob extglob ;;
		zsh) setopt nullglob extendedglob badpattern ;;
	esac
	splitpaths "$PATH" | while read -r dir; do
		for pattern in "$@"; do
			eval "printf '%s\n' '$dir'/$pattern"
			)
		done
	done
}
)


_venv_make_func() {