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
change_path_and_find_project() {
cd {{ .projectdir }}
zle fzf-cd-widget
zle reset-prompt
}
zle -N change_path_and_find_project
bindkey '^P' change_path_and_find_project
__fzf_cd__ () {
local cmd dir
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-"}"
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"
}
# quickly find a project
p(){
cd {{ .projectdir }} && `__fzf_cd__` && [[ -d ".git" ]] && git fetch
}
fi

Loading…
Cancel
Save