Compare commits

..

No commits in common. '7a87d889cd3b30f06f9819922a21a7051a651560' and '57451799c2902f06b7715a05ffcd3b00d1a5e516' have entirely different histories.

@ -119,14 +119,16 @@ zi snippet OMZP::tmux
if command -v fzf &>/dev/null; then if command -v fzf &>/dev/null; then
change_path_and_find_project() { __fzf_cd__ () {
cd {{ .projectdir }} local cmd dir
zle fzf-cd-widget cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune -o -type d -print 2> /dev/null | cut -b3-"}"
zle reset-prompt dir=$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m) && printf 'cd %q' "$dir"
} }
zle -N change_path_and_find_project # quickly find a project
bindkey '^P' change_path_and_find_project p(){
cd {{ .projectdir }} && `__fzf_cd__` && [[ -d ".git" ]] && git fetch
}
fi fi

Loading…
Cancel
Save