Skip to content

Instantly share code, notes, and snippets.

@borisbrue
Created January 6, 2020 14:40
Show Gist options
  • Save borisbrue/406670c1936e73f08fa19692535d16e7 to your computer and use it in GitHub Desktop.
Save borisbrue/406670c1936e73f08fa19692535d16e7 to your computer and use it in GitHub Desktop.
usefull ZSHRC scripts and aliases
# Activate Pyenv in shell
eval "$(pyenv init -)"
# Add Poetry to shell
export PATH=$HOME/.poetry/bin:$PATH
# Adding alias for pyenv to avoid warnings with brew doctor
alias brew='env PATH=${PATH//$(pyenv root)\/shims:/} brew'
# Visual Studio Code via zsh
function code {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
local argPath="$1"
[[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
open -a "Visual Studio Code" "$argPath"
fi
}
# aliases
alias dkps="docker ps"
alias dkst="docker stats"
alias dkpsa="docker ps -a"
alias dkimgs="docker images"
alias dkcpup="docker-compose up -d"
alias dkcpdown="docker-compose down"
alias dkcpstart="docker-compose start"
alias dkcpstop="docker-compose stop"
alias ..="cd .."
alias please="sudo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment