From f6215633d4e0ea5bbb38c03908fd0d41524919ea Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Thu, 19 Dec 2013 18:00:57 -0300 Subject: [PATCH] Add zsh to standard shell list `/usr/local/bin/zsh` has to be at `/private/etc/shells` in order to `chsh` to it --- Rakefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rakefile b/Rakefile index de492c8..e63fe13 100644 --- a/Rakefile +++ b/Rakefile @@ -252,6 +252,10 @@ def install_prezto else puts "Setting zsh as your default shell" if File.exists?("/usr/local/bin/zsh") + if File.readlines("/private/etc/shells").grep("/usr/local/bin/zsh").empty? + puts "Adding zsh to standard shell list" + run %{ echo "/usr/local/bin/zsh" | sudo tee -a /private/etc/shells } + end run %{ chsh -s /usr/local/bin/zsh } else run %{ chsh -s /bin/zsh }