dotfiles/tag-zsh/functions

21 lines
395 B
Plaintext
Raw Normal View History

2019-03-22 16:27:06 +00:00
shorten() {
pushd ~/Code/opdavi.es
git pull --rebase
npm run shorten $1 $2
popd
}
function mkd() {
mkdir -p "$@" && cd "$@"
}
2019-08-30 18:49:19 +00:00
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
}