Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improved detection of static for zsh

  • Loading branch information...
commit 18235dee2080ad9cb81636276ac9b167a395f4dc 1 parent 9300e70
@mpapis mpapis authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 zsh/shell/functions
View
6 zsh/shell/functions
@@ -8,11 +8,11 @@ zsh_prefetch()
zsh_postconfigure()
{
# Enable pcre & regex to be loaded
- if [[ ${static_flag:-0} == 0 ]]
+ if [[ ${static_flag:-0} == 1 || "$LDFLAGS" =~ "static" ]]
then
- sed -ri "/zsh\/(pcre|regex)/ { s/link=no/link=dynamic/ ; s/auto=yes/auto=no/ }" config.modules
- else
sed -ri "/zsh\/(pcre|regex)/ { s/link=no/link=static/ ; s/auto=yes/auto=no/ }" config.modules
+ else
+ sed -ri "/zsh\/(pcre|regex)/ { s/link=no/link=dynamic/ ; s/auto=yes/auto=no/ }" config.modules
fi
grep -E "zsh\/(pcre|regex)" config.modules | __sm.log.debug package -
}
Please sign in to comment.
Something went wrong with that request. Please try again.