Skip to content

Instantly share code, notes, and snippets.

@thijskok
Last active December 23, 2020 13:25
Show Gist options
  • Save thijskok/d848e76a899778055602 to your computer and use it in GitHub Desktop.
Save thijskok/d848e76a899778055602 to your computer and use it in GitHub Desktop.
ZSH configuration script
#!/bin/sh
#
# This script configures Oh My ZSH and can be directly executed after it has been installed.
# Download personal theme
wget -q -O .oh-my-zsh/themes/mnml.zsh-theme https://raw.githubusercontent.com/thijskok/zsh-theme/master/mnml.zsh-theme
# Update configuration to use theme (add default_user as well)
sed -i -e '/ZSH_THEME=/s/=.*/="mnml"\n\nDEFAULT_USER=`whoami`/' ~/.zshrc
# Update configuration to use personal selection of plugins
sed -i -e '/plugins=/s/=.*/=(git composer npm bower vagrant laravel5)/' ~/.zshrc
# Install VIMRC
git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
# Some GIT configuration
git config --global credential.helper cache
git config --global push.default simple
# And some GIT aliases
git config --global alias.cm 'checkout master'
git config --global alias.nah '!git reset --hard && git clean -df'
git config --global alias.amend "commit --amend --no-edit"
git config --global alias.upstream 'remote add upstream'
git config --global alias.updatefork '!git fetch upstream && git rebase upstream/master'
git config --global alias.personal '!git config user.name "Thijs Kok" && git config user.email "[email protected]"'
git config --global alias.work '!git config user.name "Thijs Kok" && git config user.email "[email protected]"'
# And finally, some global aliases
echo "alias art='php artisan'" >> ~/.zshrc
echo "alias phpunit='vendor/bin/phpunit'" >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment