Skip to content

Instantly share code, notes, and snippets.

@ticktricktrack
Created May 8, 2018 08:15
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 ticktricktrack/0c16c274a16020294b96c3c33558406c to your computer and use it in GitHub Desktop.
Save ticktricktrack/0c16c274a16020294b96c3c33558406c to your computer and use it in GitHub Desktop.
alias rg="rg --smart-case -g='!*.json' -g='!*.svg' --hidden"
alias ag="rg"
export HISTFILESIZE=30000
export HISTSIZE=30000
# Avoid duplicates
export HISTCONTROL=ignoreboth:erasedups
export HISTIGNORE="atom*:ag*:rg*:cat*:history:subl*:touch*:g:ls:rm*:mv*:cp*:ll:cd*:push:pull:git*:GS_ENV=live*"
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend
# After each command, append to the history file and reread it
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; cat ~/.bash_history | nl|sort -k2 -k 1,1nr|uniq -f1|sort -n|cut -f2 > ~/.foo; mv ~/.foo ~/.bash_history; history -c;history -r"
export FZF_DEFAULT_OPTS='--height 100%'
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
@andypalmer
Copy link

source ~/.zplug/init.zsh

if [ -z "$HISTFILE" ]; then
    HISTFILE=$HOME/.zhistory
fi

HISTSIZE=10000
SAVEHIST=10000

setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_verify
setopt share_history

fh() { print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//') }

zplug "cswl/zsh-rbenv"

POWERLEVEL9K_MODE='nerdfont-complete'
zplug "bhilburn/powerlevel9k", use:powerlevel9k.zsh-theme

zplug "chrissicool/zsh-256color"
zplug "jreese/zsh-titles"

zplug "zdharma/fast-syntax-highlighting", defer:2

zplug load --verbose

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f ~/.iterm2_zsh_integration ] && source ~/.iterm2_zsh_integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment