Make Zsh default
$ chsh -s /bin/zsh
Placeholders list
http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Prompt-Expansion
- Location Zsh files
$ cd /etc/
$ ls -la
...
zprofile
zshrc
zshrc_Apple_Terminal
https://scriptingosx.com/2019/06/moving-to-zsh-part-2-configuration-files/
all users | user | login shell | interactive shell | scripts | Terminal.app |
---|---|---|---|---|---|
/etc/zprofile | .zprofile | √ | x | x | √ |
/etc/zshrc | .zshrc | √ | √ | x | √ |
- .zprofice
# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
- .zshrc
alias h='fc -l -25'
alias j='jobs -l'
alias la='ls -aF'
alias lf='ls -FA'
alias ll='ls -lAF'
func listening() {
if [ $# -eq 0 ]; then
lsof -iTCP -sTCP:LISTEN -n -P
elif [ $# -eq 1 ]; then
lsof -iTCP -sTCP:LISTEN -n -P | grep -i --color $1
else
echo "Usage: listening [pattern]"
fi
}
# Rust
export PATH="$HOME/.cargo/bin:$PATH"
# defaut color prompt
PS1="🚥 %B%F{249}in %~$%f%b "
# light theme terminal
alias day='PS1="🚥 %B%F{249}in %~$%f%b "'
# dark theme terminal
alias night='PS1="❄️ %B%F{244}in %~$%f%b "'
# Emacs
alias ec='emacs -nw'
# Sublime Text and Merge
alias st='open -a "Sublime Text"'
alias sm='open -a "Sublime Merge"'
# Virtualenv Wrapper
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents/github/
source /usr/local/bin/virtualenvwrapper.sh
# Symlinks brew
export PATH="/usr/local/sbin:$PATH"
# Web assembly
export WASMTIME_HOME="$HOME/.wasmtime"
export PATH="$WASMTIME_HOME/bin:$PATH"