Skip to content

Commit

Permalink
Merge pull request #25 from kyhyco/feat/add-header-to-delete-and-remote
Browse files Browse the repository at this point in the history
feat: add header to delete and remote
  • Loading branch information
kyhyco authored Jul 12, 2024
2 parents 63f4c1f + b3081c3 commit 69e3720
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 1.2.5
- feat: add header to `fh delete` and `fh remote` for multi select
- fix: `fh delete` remove empty lines

# 1.2.4
- fix: `fh checkout` remove empty lines
- fix: `fh checkout` enable search on type
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.4
1.2.5
3 changes: 2 additions & 1 deletion commands/delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ __fh-delete() {

# get remote branch names and add blue prefix "remote" to branch names
local selection=$(
(echo "$local_branches") |
(echo "$local_branches") | grep -v '^$' |
fzf --no-sort --no-hscroll -m -n 2 \
--preview="$preview" \
--preview-window 'right,border-left,<30(hidden)' \
--header="Press tab to multi select" \
--ansi) || return

if [[ -z "$selection" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions commands/remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ __fh-format-remote-url() {
__fh-remote-add() {
local owner=$(__fh-owner)

local selection=$(__fh-list-forks | fzf -m --ansi)
local selection=$(__fh-list-forks | fzf -m --ansi --header="Press tab to multi select")

if [[ -z ${selection} ]]; then
echo "No remote selected"
Expand Down Expand Up @@ -80,7 +80,7 @@ __fh-remote-delete() {
}
{
printf name "%-18s" reset " " url "%s" reset "\n", $1, $2
}' | uniq | fzf -m --ansi)
}' | uniq | fzf -m --ansi --header="Press tab to multi select")

if [[ -z ${selection} ]]; then
echo "No remote selected"
Expand Down

0 comments on commit 69e3720

Please sign in to comment.