Skip to content

Commit

Permalink
zsh: disable /etc files by default
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Dec 16, 2013
1 parent 2e3db0d commit 52fe004
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Library/Formula/zsh.rb
Expand Up @@ -9,7 +9,7 @@ class Zsh < Formula
depends_on 'gdbm'
depends_on 'pcre'

option 'disable-etcdir', 'Disable the reading of Zsh rc files in /etc'
option 'enable-etcdir', 'Enable the reading of Zsh rc files in /etc'

def install
args = %W[
Expand All @@ -26,7 +26,11 @@ def install
--with-tcsetpgrp
]

args << '--disable-etcdir' if build.include? 'disable-etcdir'
if build.include? 'enable-etcdir'
args << '--enable-etcdir'
else
args << '--disable-etcdir'
end

system "./configure", *args

Expand All @@ -50,14 +54,6 @@ def test
def caveats; <<-EOS.undent
To use this build of Zsh as your login shell, add it to /etc/shells.
If you have administrator privileges, you must fix an Apple miss
configuration in Mac OS X 10.7 Lion by renaming /etc/zshenv to
/etc/zprofile, or Zsh will have the wrong PATH when executed
non-interactively by scripts.
Alternatively, install Zsh with /etc disabled:
brew install --disable-etcdir zsh
Add the following to your zshrc to access the online help:
unalias run-help
autoload run-help
Expand Down

0 comments on commit 52fe004

Please sign in to comment.