-
-
Save luochen1990/ff3d28a576b57edac62f6dab3778ffec to your computer and use it in GitHub Desktop.
zsh config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile' | |
[[ -e ~/.shrc ]] && emulate sh -c 'source ~/.shrc' | |
source $HOME/.antigen.zsh | |
# POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k | |
antigen use oh-my-zsh | |
antigen bundles <<EOF | |
npm | |
node | |
docker | |
cabal | |
pyenv | |
python | |
scala | |
sbt | |
gradle | |
mvn | |
pip | |
lein | |
command-not-found | |
heroku | |
larkery/zsh-histdb | |
zsh-users/zsh-syntax-highlighting | |
zsh-users/zsh-autosuggestions | |
zsh-users/zsh-completions | |
EOF | |
antigen theme bira | |
#antigen theme bhilburn/powerlevel9k powerlevel9k | |
antigen apply | |
# Configs for [histdb](https://github.com/larkery/zsh-histdb) | |
source ~/.antigen/bundles/larkery/zsh-histdb/sqlite-history.zsh | |
autoload -Uz add-zsh-hook | |
add-zsh-hook precmd histdb-update-outcome | |
_zsh_autosuggest_strategy_histdb_top(){ | |
local query="select commands.argv from | |
history left join commands on history.command_id = commands.rowid | |
left join places on history.place_id = places.rowid | |
where commands.argv LIKE '$(sql_escape $1)%' | |
group by commands.argv | |
order by places.dir != '$(sql_escape $PWD)', count(*) desc limit 1" | |
suggestion=$(_histdb_query "$query") | |
} | |
ZSH_AUTOSUGGEST_STRATEGY=histdb_top | |
source histdb-interactive.zsh | |
bindkey '^r' _histdb-isearch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L git.io/antigen > .antigen.zsh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment