Skip to content

Commit

Permalink
feat(label): include label's name in edit prompts
Browse files Browse the repository at this point in the history
Add the label's current name to the prompt text when editing the name
(`alt-n`), description (`alt-d`), and color (`alt-c`). This clarifies
which label is being edited when multiple are selected via fzf.
  • Loading branch information
benelan committed Jun 2, 2024
1 parent 2dbea75 commit d45ea06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gh-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,16 @@ $global_binds
--bind="start:$on_start" \
--bind="ctrl-o:execute-silent(gh label list --web $repo_flag &)" \
--bind='alt-n:execute(
read -rp "Enter new label name: " name;
read -rp "Enter new name for {1} label: " name;
[ -n "$name" ] && gh label edit {1} --name "$name" '"$repo_flag"'
)' \
--bind='alt-d:execute(
read -rp "Enter new label description: " description;
read -rp "Enter new description for {1} label: " description;
[ -n "$description" ] &&
gh label edit {1} --description "$description" '"$repo_flag"'
)' \
--bind='alt-c:execute(
read -rp "Enter new label color: " color;
read -rp "Enter new color for {1} label: " color;
[ -n "$color" ] && gh label edit {1} --color "$color" '"$repo_flag"'
)' \
--bind="alt-X:execute(gh label delete {1} $repo_flag)" \
Expand Down

0 comments on commit d45ea06

Please sign in to comment.