|
|
@ -104,7 +104,8 @@ if [[ $- =~ i ]]; then
|
|
|
|
_fzf_git_fzf() {
|
|
|
|
_fzf_git_fzf() {
|
|
|
|
fzf-tmux -p80%,60% -- \
|
|
|
|
fzf-tmux -p80%,60% -- \
|
|
|
|
--layout=reverse --multi --height=50% --min-height=20 --border \
|
|
|
|
--layout=reverse --multi --height=50% --min-height=20 --border \
|
|
|
|
--color='header:italic:underline' \
|
|
|
|
--border-label-pos=2 \
|
|
|
|
|
|
|
|
--color='header:italic:underline,label:blue' \
|
|
|
|
--preview-window='right,50%,border-left' \
|
|
|
|
--preview-window='right,50%,border-left' \
|
|
|
|
--bind='ctrl-/:change-preview-window(down,50%,border-top|hidden|)' "$@"
|
|
|
|
--bind='ctrl-/:change-preview-window(down,50%,border-top|hidden|)' "$@"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -135,7 +136,7 @@ _fzf_git_files() {
|
|
|
|
(git -c color.status=always status --short
|
|
|
|
(git -c color.status=always status --short
|
|
|
|
git ls-files | grep -vxFf <(git status -s | grep '^[^?]' | cut -c4-; echo :) | sed 's/^/ /') |
|
|
|
|
git ls-files | grep -vxFf <(git status -s | grep '^[^?]' | cut -c4-; echo :) | sed 's/^/ /') |
|
|
|
|
_fzf_git_fzf -m --ansi --nth 2..,.. \
|
|
|
|
_fzf_git_fzf -m --ansi --nth 2..,.. \
|
|
|
|
--prompt '📁 Files> ' \
|
|
|
|
--border-label '📁 Files' \
|
|
|
|
--header $'CTRL-O (open in browser) ╱ ALT-E (open in editor)\n\n' \
|
|
|
|
--header $'CTRL-O (open in browser) ╱ ALT-E (open in editor)\n\n' \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git file {-1}" \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git file {-1}" \
|
|
|
|
--bind "alt-e:execute:${EDITOR:-vim} {-1} > /dev/tty" \
|
|
|
|
--bind "alt-e:execute:${EDITOR:-vim} {-1} > /dev/tty" \
|
|
|
@ -147,7 +148,7 @@ _fzf_git_branches() {
|
|
|
|
_fzf_git_check || return
|
|
|
|
_fzf_git_check || return
|
|
|
|
bash "$__fzf_git" branches |
|
|
|
|
bash "$__fzf_git" branches |
|
|
|
|
_fzf_git_fzf --ansi \
|
|
|
|
_fzf_git_fzf --ansi \
|
|
|
|
--prompt '🌲 Branches> ' \
|
|
|
|
--border-label '🌲 Branches' \
|
|
|
|
--header-lines 2 \
|
|
|
|
--header-lines 2 \
|
|
|
|
--tiebreak begin \
|
|
|
|
--tiebreak begin \
|
|
|
|
--preview-window down,border-top,40% \
|
|
|
|
--preview-window down,border-top,40% \
|
|
|
@ -164,7 +165,7 @@ _fzf_git_tags() {
|
|
|
|
_fzf_git_check || return
|
|
|
|
_fzf_git_check || return
|
|
|
|
git tag --sort -version:refname |
|
|
|
|
git tag --sort -version:refname |
|
|
|
|
_fzf_git_fzf --preview-window right,70% \
|
|
|
|
_fzf_git_fzf --preview-window right,70% \
|
|
|
|
--prompt '📛 Tags> ' \
|
|
|
|
--border-label '📛 Tags' \
|
|
|
|
--header $'CTRL-O (open in browser)\n\n' \
|
|
|
|
--header $'CTRL-O (open in browser)\n\n' \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git tag {}" \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git tag {}" \
|
|
|
|
--preview 'git show --color=always {}' "$@"
|
|
|
|
--preview 'git show --color=always {}' "$@"
|
|
|
@ -174,7 +175,7 @@ _fzf_git_hashes() {
|
|
|
|
_fzf_git_check || return
|
|
|
|
_fzf_git_check || return
|
|
|
|
git log --date=short --format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" --graph --color=always |
|
|
|
|
git log --date=short --format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" --graph --color=always |
|
|
|
|
_fzf_git_fzf --ansi --no-sort --bind 'ctrl-s:toggle-sort' \
|
|
|
|
_fzf_git_fzf --ansi --no-sort --bind 'ctrl-s:toggle-sort' \
|
|
|
|
--prompt '🍡 Hashes> ' \
|
|
|
|
--border-label '🍡 Hashes' \
|
|
|
|
--header $'CTRL-O (open in browser) ╱ CTRL-D (diff) ╱ CTRL-S (toggle sort)\n\n' \
|
|
|
|
--header $'CTRL-O (open in browser) ╱ CTRL-D (diff) ╱ CTRL-S (toggle sort)\n\n' \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git commit {}" \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git commit {}" \
|
|
|
|
--bind 'ctrl-d:execute:grep -o "[a-f0-9]\{7,\}" <<< {} | head -n 1 | xargs git diff > /dev/tty' \
|
|
|
|
--bind 'ctrl-d:execute:grep -o "[a-f0-9]\{7,\}" <<< {} | head -n 1 | xargs git diff > /dev/tty' \
|
|
|
@ -187,7 +188,7 @@ _fzf_git_remotes() {
|
|
|
|
_fzf_git_check || return
|
|
|
|
_fzf_git_check || return
|
|
|
|
git remote -v | awk '{print $1 "\t" $2}' | uniq |
|
|
|
|
git remote -v | awk '{print $1 "\t" $2}' | uniq |
|
|
|
|
_fzf_git_fzf --tac \
|
|
|
|
_fzf_git_fzf --tac \
|
|
|
|
--prompt '📡 Remotes> ' \
|
|
|
|
--border-label '📡 Remotes' \
|
|
|
|
--header $'CTRL-O (open in browser)\n\n' \
|
|
|
|
--header $'CTRL-O (open in browser)\n\n' \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git remote {1}" \
|
|
|
|
--bind "ctrl-o:execute-silent:bash $__fzf_git remote {1}" \
|
|
|
|
--preview-window right,70% \
|
|
|
|
--preview-window right,70% \
|
|
|
@ -198,7 +199,7 @@ _fzf_git_remotes() {
|
|
|
|
_fzf_git_stashes() {
|
|
|
|
_fzf_git_stashes() {
|
|
|
|
_fzf_git_check || return
|
|
|
|
_fzf_git_check || return
|
|
|
|
git stash list | _fzf_git_fzf \
|
|
|
|
git stash list | _fzf_git_fzf \
|
|
|
|
--prompt '🥡 Stashes> ' \
|
|
|
|
--border-label '🥡 Stashes' \
|
|
|
|
--header $'CTRL-X (drop stash)\n\n' \
|
|
|
|
--header $'CTRL-X (drop stash)\n\n' \
|
|
|
|
--bind 'ctrl-x:execute-silent(git stash drop {1})+reload(git stash list)' \
|
|
|
|
--bind 'ctrl-x:execute-silent(git stash drop {1})+reload(git stash list)' \
|
|
|
|
-d: --preview 'git show --color=always {1}' "$@" |
|
|
|
|
-d: --preview 'git show --color=always {1}' "$@" |
|
|
|
@ -210,7 +211,7 @@ _fzf_git_each_ref() {
|
|
|
|
bash "$__fzf_git" refs | _fzf_git_fzf --ansi \
|
|
|
|
bash "$__fzf_git" refs | _fzf_git_fzf --ansi \
|
|
|
|
--nth 2,2.. \
|
|
|
|
--nth 2,2.. \
|
|
|
|
--tiebreak begin \
|
|
|
|
--tiebreak begin \
|
|
|
|
--prompt '☘️ Each ref> ' \
|
|
|
|
--border-label '☘️ Each ref' \
|
|
|
|
--header-lines 2 \
|
|
|
|
--header-lines 2 \
|
|
|
|
--preview-window down,border-top,40% \
|
|
|
|
--preview-window down,border-top,40% \
|
|
|
|
--color hl:underline,hl+:underline \
|
|
|
|
--color hl:underline,hl+:underline \
|
|
|
|