Skip to content

Commit

Permalink
Merge pull request #250 from aphecetche/bugfix-shell-detection-zsh
Browse files Browse the repository at this point in the history
Regexp special character \? not working on all systems. Replaced with \{0,1\}
  • Loading branch information
dberzano committed May 10, 2016
2 parents 52f994d + fab0413 commit f632a32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alienv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
PROG=$(basename "$0")

# Detect parent shell (fall back to bash)
[[ -z "$MODULES_SHELL" ]] && MODULES_SHELL=$(ps -e -o pid,command | grep -E "^\s*$PPID\s+" | awk '{print $2}' | sed -e 's/^-\?\(.*\)$/\1/')
[[ -z "$MODULES_SHELL" ]] && MODULES_SHELL=$(ps -e -o pid,command | grep -E "^\s*$PPID\s+" | awk '{print $2}' | sed -e 's/^-\{0,1\}\(.*\)$/\1/')
case "$MODULES_SHELL" in
sh) ;;
csh|tcsh) SHELL_NORC_PARAM=-f ;;
Expand Down

0 comments on commit f632a32

Please sign in to comment.