Compare commits

...

3 Commits

@ -119,16 +119,14 @@ zi snippet OMZP::tmux
if command -v fzf &>/dev/null; then if command -v fzf &>/dev/null; then
__fzf_cd__ () { change_path_and_find_project() {
local cmd dir cd {{ .projectdir }}
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 fzf-cd-widget
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 reset-prompt
} }
# quickly find a project zle -N change_path_and_find_project
p(){ bindkey '^P' change_path_and_find_project
cd {{ .projectdir }} && `__fzf_cd__` && [[ -d ".git" ]] && git fetch
}
fi fi

Loading…
Cancel
Save