Skip to content

Instantly share code, notes, and snippets.

@fabiotatsuo
Last active June 16, 2022 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiotatsuo/70a3cb7b9c22a867792d5d0acf15f317 to your computer and use it in GitHub Desktop.
Save fabiotatsuo/70a3cb7b9c22a867792d5d0acf15f317 to your computer and use it in GitHub Desktop.
.zshrc

Make Zsh default

$ chsh -s /bin/zsh

Placeholders list
http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Prompt-Expansion

  1. 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
  1. .zprofice
# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
  1. .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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment