mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Define fzf helper functions properly
This commit is contained in:
parent
5e6ebcac2b
commit
a212838abf
1 changed files with 17 additions and 17 deletions
10
shell/fzf
10
shell/fzf
|
|
@ -6,8 +6,9 @@ if command -v fzf 2>&1 >/dev/null; then
|
|||
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!{.git,node_modules,vendor}/*"'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
fi
|
||||
fi
|
||||
|
||||
function fcd() {
|
||||
function fzcd() {
|
||||
local dir;
|
||||
|
||||
while true; do
|
||||
|
|
@ -18,11 +19,10 @@ if command -v fzf 2>&1 >/dev/null; then
|
|||
cd "${dir}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
function fgit() {
|
||||
function fzgit() {
|
||||
git log --oneline --decorate --color | fzf --ansi --preview 'git show $(echo {} | cut -d" " -f1)'
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
# vim: ft=bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue