Skip to content

Instantly share code, notes, and snippets.

@cconversion
Created October 25, 2018 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cconversion/a89d25c6cf837f7a3bc54a969fbc612f to your computer and use it in GitHub Desktop.
Save cconversion/a89d25c6cf837f7a3bc54a969fbc612f to your computer and use it in GitHub Desktop.
Antigen zshrc - Just enter 'zsh' to load
ANTIGEN_LOG=~/.antigen/antigen.log
# ANTIGEN_CACHE=false
COMPOSER_HOME="$HOME/.composer"
source $HOME/antigen.zsh
PATH=$HOME/bin:$HOME/scripts:$COMPOSER_HOME:/usr/local/bin:$PATH
# OH-MY-ZSH CONFIGURATION
DISABLE_CORRECTION="true"
HIST_STAMPS="yyyy-mm-dd"
# >>>>>>>>> START ANTIGEN SCRIPTS
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
#
#
# Load the theme.
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
ZSH_HIGHLIGHT_PATTERNS=('rm -rf *' 'fg=white,bold,bg=red') # To have commands starting with `rm -rf` in red:zsh-syntax-highlighting
SPACESHIP_TIME_SHOW=true
SPACESHIP_TIME_COLOR=blue
SPACESHIP_HOST_SHOW=true
SPACESHIP_PHP_SHOW=true
SPACESHIP_BATTERY_SHOW=true
SPACESHIP_BATTERY_THRESHOLD=20
antigen theme denysdovhan/spaceship-prompt
# antigen theme spaceship
# antigen theme gnzh
# antigen theme jeremyFreeAgent/oh-my-zsh-powerline-theme
# antigen theme geometry-zsh/geometry
# antigen theme zakaziko99/agnosterzak-ohmyzsh-theme
#
#
# Bundles
antigen bundle autojump
antigen bundle bobthecow/git-flow-completion
antigen bundle brew
antigen bundle brew-cask
antigen bundle bundler
antigen bundle colored-man-pages
antigen bundle command-not-found
antigen bundle composer
antigen bundle elstgav/branch-manager
# update_branch update changes while preserving your current workspace.
# merge_branch merge changes while preserving your current workspace.
antigen bundle extract
antigen bundle git
antigen bundle gnu-utils
antigen bundle httpie
antigen bundle MichaelAquilina/zsh-emojis
#antigen bundle rutchkiwi/copyzshell
antigen bundle unixorn/autoupdate-antigen.zshplugin
antigen bundle valentinocossar/sublime
antigen bundle voronkovich/apache2.plugin.zsh
#antigen bundle voronkovich/phpcs.plugin.zsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle rcruzper/zsh-git-plugin
# Adds some functions for git.
#
# gshow It shows the list of commits and performs a git show of the selected commit.
# grebase It performs a git rebase branch from a list of branches (git branch --all).
# grebasei It performs an interactive rebase selecting the base commit from the rebase that will be performed. (e.g. select fourth commit if you want to rebase the first three commits)
# gdelete It shows a list of merged branches with the actual branch and allows to select one to delete.
# gcshow Returns the SHA-1 of a commit from a list of commits.
# gpremotes Creates local branches of all remote branches.
# gcheckout It allows to checkout a branch from a list of branches (git branch --all).
# If you add arguments to the command, then it will be executed as 'git checkout -b *args' and a new branch will be created.
antigen bundle peterhurford/git-aliases.zsh
# Creates a lot of useful aliases for combinations of commonly used git commands.
# s does git status
# reset does git reset --hard
# reset <file> does git checkout <current branch> <file>
# co <branch> does git checkout <branch>. You can tab autocomplete these branches.
# cob <branch> does git checkout -b <branch> (make a branch)
# gf does git fetch
# gb does git branch (see your branches)
# clone <git username> <repo name>
# shortens git clone by not requiring the URL (though you can clone <URL> if you want to).
# Also, will cd into the directory automatically. (Use clone -d to not cd automatically.)
antigen bundle unixorn/git-extra-commands
# Extra git helper scripts packaged as a plugin.
antigen bundle smallhadroncollider/antigen-git-rebase
# Antigen/zsh script to aid with Git rebasing.
antigen bundle Seinh/git-prune
# Plugin that simplifies deleting merged branches.
# gprune [ -r | --remote | -b | --both ] <branch-name> Perform the removal of the merged local branches by just writing the command:
antigen bundle git-secret
# A bash-tool to store your private data inside a git repository.
# 'git-secret' encrypts tracked files with public keys for users whom you trust using gpg,
# allowing permitted users to access encrypted data using their secret keys.
# With git-secret, changes to access rights are made easy and private-public key issues are handled for you.
# Passwords do not need to be changed with git-secret
# when someone's permission is revoked - just remove their key from the keychain using
# 'git secret killperson their@email.com', and re-encrypt the files, and they won't be able to decrypt secrets anymore.
antigen bundle seletskiy/zsh-git-smart-commands
# Adds git commands to make some common git usages more efficient.
antigen bundle caarlos0/git-add-remote
# @see https://github.com/caarlos0/git-add-remote
antigen bundle caarlos0/zsh-git-sync
# A ZSH plugin to sync git repositories and clean them up.
# antigen bundle tevren/gitfast-zsh-plugin
# Updated fork of oh-my-zsh gitfast plugin.
antigen bundle zsh-users/zsh-completions
#antigen bundle chrissicool/zsh-bash # redefines the source command to act more like Bash does. It also enables Bash completions.
# * @see http://blog.namangoel.com/zsh-with-antigen
antigen bundle zsh-users/zsh-autosuggestions
# Slows down the terminal :(
# * fix using installer AFTER 'angtigen apply'
# antigen bundle hchbaw/auto-fu.zsh
antigen bundle zsh-users/zsh-history-substring-search
# Tell antigen that you're done.
antigen apply
# The following plugins can be buggy and might need to be sourced after 'antigen apply'
# source /home/cbk/.antigen/bundles/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh
# source /home/cbk/.antigen/bundles/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
#
# sudo chown -R $USER:root /home/$USER/.antigen/bundles/
# sudo chmod -R 755 /home/$USER/.antigen/bundles/
#antigen cleanup
#antigen reset
# <<<<<<<<<< END ANTIGEN SCRIPTS
#
#
# Any BAshell/Legacy laod scripts go here below >>>>
# >>>>>>>>> START BASH SCRIPTS
# >>> START LEGACY LOADER
[[ -s "$HOME/.bash_aliases" ]] && source "$HOME/.bash_aliases"
autoload bashcompinit
bashcompinit
# >>> END LEGACY LOADER
WPCLI_TABCOMPL="$COMPOSER_HOME/vendor/wp-cli/wp-cli/utils/wp-completion.bash"
source $WPCLI_TABCOMPL
# <<<<<<<<<< END BASH SCRIPTS
#
#
# >>>>>>>>> START ALIAS SCRIPTS
# source ~/.alias
alias emptytrash="sudo rm -rf ~/.local/share/Trash/*"
alias gitpullforce="git stash save --keep-index && git pull -f && git stash drop && git status"
# <<<<<<<<<< END ALIAS SCRIPTS
export VISUAL=subl
export EDITOR=subl
export BROWSER=firefox
echo "ZSH.env loaded..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment