Last active
February 1, 2022 18:26
-
-
Save jjercx/91a5696b9863df880972019acaa2a40a to your computer and use it in GitHub Desktop.
ZSH Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# alias | |
alias ip-wifi="ipconfig getifaddr en0" | |
alias ip-ethernet="ipconfig getifaddr en5" | |
alias network="networksetup -listallhardwareports" | |
alias mac="ifconfig en1 | awk '/ether/{print $2}'" | |
# nvm | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
# Android for React Native | |
export ANDROID_HOME=$HOME/Library/Android/sdk | |
export PATH=$PATH:$ANDROID_HOME/emulator | |
export PATH=$PATH:$ANDROID_HOME/tools | |
export PATH=$PATH:$ANDROID_HOME/tools/bin | |
export PATH=$PATH:$ANDROID_HOME/platform-tools | |
# rbenv | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
# direnv | |
eval "$(direnv hook zsh)" | |
# sets the tab title to current dir | |
# also needs changes in iTerm UI | |
# https://gist.github.com/phette23/5270658 | |
DISABLE_AUTO_TITLE="true" | |
precmd() { | |
echo -ne "\e]1;${PWD##*/}\a" | |
} | |
# ZSH config | |
export ZSH="/Users/juanjo/.oh-my-zsh" | |
ZSH_THEME="robbyrussell" | |
plugins=( | |
git | |
colored-man-pages colorize pip python brew macos | |
bundler dotenv rake rbenv ruby | |
) | |
source $ZSH/oh-my-zsh.sh | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
# Set Spaceship ZSH as a prompt | |
autoload -U promptinit; promptinit | |
prompt spaceship |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment