Skip to content

Latest commit

 

History

History

zsh

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Oh My Laptop Zsh

This is part of oh-my-laptop.

Packages

path_helper in OS X

When you install packages(such as mactex) via homebrew, you may see the following text:

# $ brew cask install mactex
# ==> Caveats
# To use mactex, zsh users may need to add the following line to their
# ~/.zprofile.  (Among other effects, /usr/texbin will be added to the
# PATH environment variable):

#   eval `/usr/libexec/path_helper -s`
if [[ -f /usr/libexec/path_helper ]]; then
    eval `/usr/libexec/path_helper -s`
fi

Seems strange, ha? path_helper is a binary executable which helps you to construct proper $PATH variable through /etc/paths/ and files in /etc/path.d/. However, when /usr/libexec/path_helper -s, it depends on the current $PATH variable, which is not sure in different moment, that’s all trouble begins. I prefer to provide an empty PATH="" variable when /usr/libexec/path_helper -s. So I replace /etc/profile and /etc/zshenv when oh-my-laptop runs, so I can get more precise control over $PATH.

Refs:

zsh and oh-my-zsh

zsh is a shell designed for interactive use. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added. Check the following posts to get some knowledge about why zsh is a much more cooler option than bash:

oh-my-zsh is a community-driven framework for managing your zsh configuration. Includes 180+ optional plugins (rails, git, OS X, hub, capistrano, brew, ant, php, python, etc), over 120 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.