Skip to content

Instantly share code, notes, and snippets.

@waterlow
Created August 30, 2019 08:11
Show Gist options
  • Select an option

  • Save waterlow/d669c03e00ea765db58e04123f2bb716 to your computer and use it in GitHub Desktop.

Select an option

Save waterlow/d669c03e00ea765db58e04123f2bb716 to your computer and use it in GitHub Desktop.
export ZPLUG_HOME=/usr/local/opt/zplug
source $ZPLUG_HOME/init.zsh
# prezto のプラグインやテーマを使用する
zplug "modules/git", from:prezto
zplug "modules/osx", from:prezto, if:"[[ $OSTYPE == *darwin* ]]"
zplug "modules/prompt", from:prezto
# zstyle は zplug load の前に設定する
zstyle ':prezto:module:prompt' theme 'sorin'
zplug "zsh-users/zsh-history-substring-search"
zplug "lib/git", from:oh-my-zsh
zplug "plugins/common-aliases", from:oh-my-zsh
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load --verbose
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
function ghq-fzf() {
local selected_dir=$(ghq list | fzf --query="$LBUFFER")
if [ -n "$selected_dir" ]; then
BUFFER="cd $(ghq root)/${selected_dir}"
zle accept-line
fi
zle reset-prompt
}
zle -N ghq-fzf
bindkey "^]" ghq-fzf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment