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 +1 -1
- package/shell/git-extras.sh +9 -16
package/package.json
CHANGED
package/shell/git-extras.sh
CHANGED
|
@@ -448,18 +448,16 @@ greset() { # greset [*file] | Reset a specific file with confirmation (interacti
|
|
|
448
448
|
return 0
|
|
449
449
|
fi
|
|
450
450
|
|
|
451
|
-
|
|
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
|
|
460
|
-
|
|
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 [[ "$
|
|
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
|
-
|
|
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)"
|