Move zsh configs
This commit is contained in:
parent
bde71986a4
commit
78eff56e53
6 changed files with 4 additions and 26 deletions
33
tag-zsh/zsh/configs/aliases.zsh
Normal file
33
tag-zsh/zsh/configs/aliases.zsh
Normal 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
|
20
tag-zsh/zsh/configs/functions.zsh
Normal file
20
tag-zsh/zsh/configs/functions.zsh
Normal 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
|
||||
}
|
7
tag-zsh/zsh/configs/navigation.zsh
Normal file
7
tag-zsh/zsh/configs/navigation.zsh
Normal file
|
@ -0,0 +1,7 @@
|
|||
setopt auto_cd
|
||||
cdpath=(
|
||||
$HOME/Code \
|
||||
$HOME/Code/clients \
|
||||
$HOME/Code/os \
|
||||
$HOME
|
||||
)
|
6
tag-zsh/zsh/configs/platformsh.zsh
Normal file
6
tag-zsh/zsh/configs/platformsh.zsh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue