git-jira-shortcuts 1.0.5 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-jira-shortcuts",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Git + Jira workflow shortcuts for zsh — interactive branch switching, auto-prefixed commits, Jira integration, and more.",
5
5
  "author": "chipallen2",
6
6
  "license": "MIT",
@@ -448,18 +448,16 @@ greset() { # greset [*file] | Reset a specific file with confirmation (interacti
448
448
  return 0
449
449
  fi
450
450
 
451
- echo "Select a file to reset:"
452
- echo " 1) ALL (reset all files)"
453
- local i=2
454
- for f in "${files[@]}"; do
455
- echo " $i) $f"
456
- ((i++))
457
- done
451
+ local options=("ALL (reset all files)" "${files[@]}")
458
452
 
459
- echo -n "Enter number: "
460
- read choice
453
+ echo "Select a file to reset (↑/↓ select, Enter confirm, q cancel):"
454
+ local picked
455
+ if ! picked=$(_gjs_interactive_menu "${options[@]}"); then
456
+ echo "Cancelled."
457
+ return 1
458
+ fi
461
459
 
462
- if [[ "$choice" == "1" ]]; then
460
+ if [[ "$picked" == "ALL (reset all files)" ]]; then
463
461
  echo "Are you sure you want to reset ALL files? (Y/N)"
464
462
  read -k user_input
465
463
  echo
@@ -473,12 +471,7 @@ greset() { # greset [*file] | Reset a specific file with confirmation (interacti
473
471
  return 0
474
472
  fi
475
473
 
476
- local idx=$((choice - 1))
477
- if [[ $idx -lt 1 || $idx -gt ${#files[@]} ]]; then
478
- echo "❌ Invalid selection"
479
- return 1
480
- fi
481
- file="${files[$idx]}"
474
+ file="$picked"
482
475
  fi
483
476
 
484
477
  echo "Are you sure you want to reset $file? (Y/N)"