Move zsh configs

This commit is contained in:
Oliver Davies 2020-01-14 14:57:48 +00:00
parent bde71986a4
commit 78eff56e53
6 changed files with 4 additions and 26 deletions

View file

@ -0,0 +1,33 @@
alias l="ls -lah"
# Fast open
alias o="open ."
alias p="phpunit"
alias pf="phpunit --filter "
alias pstorm="phpstorm"
alias st="subl"
alias stt="subl ."
alias y=yarn
alias ya='yarn add'
alias yd="yarn dev"
alias yp="yarn prod"
alias ys="yarn serve"
alias yw="yarn watch"
alias hosts="sudo vim /etc/hosts"
alias sshconfig='vim ~/.ssh/config'
alias zshconfig='vim ~/.zshrc'
# Pretty print the path
alias path='echo $PATH | tr -s ":" "\n"'
# PhpStorm
alias pstorm='open -a /Applications/PhpStorm.app "`pwd`"'
# Sublime Text
alias sublime='open -a /Applications/Sublime\ Text.app "`pwd`"'
# Include custom aliases
[[ -f ~/.aliases.local ]] && source ~/.aliases.local

View file

@ -0,0 +1,20 @@
shorten() {
pushd ~/Code/opdavi.es
git pull --rebase
npm run shorten $1 $2
popd
}
function mkd() {
mkdir -p "$@" && cd "$@"
}
function db {
if [ "$1" = "refresh" ]; then
mysql -uroot -e "drop database $2; create database $2"
elif [ "$1" = "create" ]; then
mysql -uroot -e "create database $2"
elif [ "$1" = "drop" ]; then
mysql -uroot -e "drop database $2"
fi
}

View file

@ -0,0 +1,7 @@
setopt auto_cd
cdpath=(
$HOME/Code \
$HOME/Code/clients \
$HOME/Code/os \
$HOME
)

View file

@ -0,0 +1,6 @@
# Platform.sh CLI configuration.
export PATH="$HOME/"'.platformsh/bin':"$PATH"
if [ -f "$HOME/"'.platformsh/shell-config.rc' ]; then
. "$HOME/"'.platformsh/shell-config.rc';
fi