Skip to content

Instantly share code, notes, and snippets.

@geffrak
Last active November 23, 2022 23:53
Show Gist options
  • Save geffrak/1d0e01297c689a3265354b2cd224efee to your computer and use it in GitHub Desktop.
Save geffrak/1d0e01297c689a3265354b2cd224efee to your computer and use it in GitHub Desktop.
export PATH=$HOME/.local/bin:$HOME/go/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
export ZSH=$HOME/.oh-my-zsh
export UPDATE_ZSH_DAYS=1
export MANPATH="/usr/local/man:$MANPATH"
export LANG=en_US.UTF-8
export EDITOR='vim'
export SSH_KEY_PATH="$HOME/.ssh/rsa_id"
ZSH_THEME="ys"
CASE_SENSITIVE="true"
HYPHEN_INSENSITIVE="true"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="dd/mm/yyyy"
unsetopt correct_all
plugins=(
fzf
gitfast
zsh-autosuggestions
zsh-syntax-highlighting
)
include () {
[[ -f "$1" ]] && source "$1"
}
include $ZSH/oh-my-zsh.sh
export PRE_COMMIT_ALLOW_NO_CONFIG=1
source <( find ~/code -d -mindepth 1 -maxdepth 4 -name ".*" -prune -o -print | xargs -n 1 -I @ sh -c 'echo export `basename $1 | sed "s/[^[:alnum:]]//g" | tr "[:upper:]" "[:lower:]"`=$\{`basename $1 | sed "s/[^[:alnum:]]//g"`:=\"`realpath $1`\"\}' - @ )
export GEM_HOME=$HOME/.gem
export GEM_PATH=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH
include ~/.`hostname`
include ~/.`uname`
precmd(){
source <( echo export GIT_COMMIT=`git rev-parse HEAD 2> /dev/null || true` )
source <( echo export GIT_BRANCH=`git rev-parse --abbrev-ref HEAD 2> /dev/null || true` )
source <( echo export GIT_ORIGIN=`git config --get remote.origin.url 2> /dev/null || true`)
}
PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment