Merge branch 'master' into clipboard

This commit is contained in:
Paul Irish 2025-04-15 10:31:56 -07:00 committed by GitHub
commit 9e9e1cfbc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,6 +53,8 @@ elif command -v xsel >/dev/null; then
copy_cmd="printf '%s' {} | xsel --clipboard" copy_cmd="printf '%s' {} | xsel --clipboard"
fi fi
# if extra arg passed (eg `git recent remotename`), then list those remote branches, rather than local ones
[[ -n "$1" ]] && heads="refs/remotes/$1" || heads="refs/heads"
# fzf git inspiration: # fzf git inspiration:
# - https://github.com/junegunn/fzf/wiki/Examples#git # - https://github.com/junegunn/fzf/wiki/Examples#git
@ -60,7 +62,7 @@ fi
# - https://github.com/junegunn/fzf-git.sh (intense.) # - https://github.com/junegunn/fzf-git.sh (intense.)
_browse_branches() { _browse_branches() {
git for-each-ref --color=always --sort=-authordate "refs/heads/" --format="$branches_format" \ git for-each-ref --color=always --sort=-authordate "$heads" --format="$branches_format" \
| fzf --ansi -- \ | fzf --ansi -- \
--layout=reverse --multi --height=90% --min-height=20 \ --layout=reverse --multi --height=90% --min-height=20 \
--border-label-pos=2 --border-label '🌲 Branches' --border \ --border-label-pos=2 --border-label '🌲 Branches' --border \