Skip to content

Commit

Permalink
feat(label): reload list after edit keybinds
Browse files Browse the repository at this point in the history
Reload the list after editing the name via `alt-n`, description via
`alt-d`, and color via `alt-c`. This ensures the new value is displayed,
rather than the outdated one.
  • Loading branch information
benelan committed Jun 3, 2024
1 parent 44bd0af commit b76453a
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 @@ -476,16 +476,16 @@ $global_binds
--bind='alt-n:execute(
read -rp "Enter new name for {1} label: " name;
[ -n "$name" ] && gh label edit {1} --name "$name" '"$repo_flag"'
)' \
)+reload(eval "$FZF_DEFAULT_COMMAND")' \
--bind='alt-d:execute(
read -rp "Enter new description for {1} label: " description;
[ -n "$description" ] &&
gh label edit {1} --description "$description" '"$repo_flag"'
)' \
)+reload(eval "$FZF_DEFAULT_COMMAND")' \
--bind='alt-c:execute(
read -rp "Enter new color for {1} label: " color;
[ -n "$color" ] && gh label edit {1} --color "$color" '"$repo_flag"'
)' \
)+reload(eval "$FZF_DEFAULT_COMMAND")' \
--bind="alt-X:execute(gh label delete {1} $repo_flag)" \
--bind='alt-N:reload(eval "$FZF_DEFAULT_COMMAND --sort name")' \
--bind='alt-D:reload(eval "$FZF_DEFAULT_COMMAND --order desc")' || true
Expand Down

0 comments on commit b76453a

Please sign in to comment.