git-jira-shortcuts 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/shell/git-extras.sh +41 -31
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-jira-shortcuts",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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",
@@ -273,37 +273,47 @@ grepos() { # grepos | Show all repo clones and their current branch
273
273
  alias repos='grepos' # grepos | Alias for grepos
274
274
 
275
275
  ghelp() { # ghelp | Show all git-jira-shortcuts commands
276
- echo "🧠 GIT-JIRA-SHORTCUTS:"
277
- echo "[arg] = Required [*arg] = Optional [arg=default] = Optional with default"
278
- echo
279
- local -a entries=()
280
- grep -E "^(alias .*# |[a-zA-Z_]+\(\) \{ # )" "$GJS_SHELL_SCRIPT_PATH" | while IFS= read -r line; do
281
- if [[ "$line" == alias* ]]; then
282
- name=$(echo "$line" | sed 's/alias \([^=]*\)=.*/\1/')
283
- comment=$(echo "$line" | sed 's/.*# \(.*\)/\1/')
284
- entries+=("$name|$comment")
285
- else
286
- name=$(echo "$line" | sed 's/\([a-zA-Z_]*\)().*/\1/')
287
- comment=$(echo "$line" | sed 's/.*# \(.*\)/\1/')
288
- entries+=("$name|$comment")
289
- fi
290
- done
291
- local max_name_len=0
292
- local max_cmd_len=0
293
- for entry in "${entries[@]}"; do
294
- name="${entry%%|*}"
295
- rest="${entry#*|}"
296
- cmd="${rest%%|*}"
297
- (( ${#name} > max_name_len )) && max_name_len=${#name}
298
- (( ${#cmd} > max_cmd_len )) && max_cmd_len=${#cmd}
299
- done
300
- for entry in "${entries[@]}"; do
301
- name="${entry%%|*}"
302
- rest="${entry#*|}"
303
- cmd="${rest%%|*}"
304
- desc="${rest#*|}"
305
- printf "%-*s | %-*s | %s\n" "$max_name_len" "$name" "$max_cmd_len" "$cmd" "$desc"
306
- done | sort
276
+ cat >&2 <<'EOF'
277
+ 🧠 GIT-JIRA-SHORTCUTS
278
+
279
+ ── Status ─────────────────────────────────────────────────────
280
+ gs Quick git status branch, sync info, pending files
281
+ gl / glist List all pending files (staged, unstaged, untracked)
282
+ grecent Show last 10 branches you checked out
283
+
284
+ ── Branching ──────────────────────────────────────────────────
285
+ gw [branch] Switch branches — arrow-key picker if no branch given
286
+ gswitch (same, also accepts --force / -f)
287
+ gt <branch|ticket#> Create or switch to a branch — auto-names from Jira
288
+ gstart, gcreate (same)
289
+ gdel [branch] Delete a branch — interactive picker, safety checks
290
+ gdelete (same)
291
+
292
+ ── Committing & Pushing ───────────────────────────────────────
293
+ gf <message> Stage all commit (skip hooks) → push
294
+ gcfast (same) Auto-prefixes ticket ID from branch name.
295
+ gc <message> Stage all → commit (with hooks) → push
296
+ gcommit (same) Auto-prefixes ticket ID from branch name.
297
+ gpu [branch] Push current branch with upstream tracking
298
+ gpush (same)
299
+ gp Pull (no rebase, no editor)
300
+
301
+ ── Merge & Diff ───────────────────────────────────────────────
302
+ gm [branch] Merge into current branch — conflict check first
303
+ gmerge (same)
304
+ gdiff [branch] Files changed vs target branch + GitHub compare link
305
+
306
+ ── File Operations ────────────────────────────────────────────
307
+ gr [file] Reset a file with confirmation — picker if no file
308
+ greset (same)
309
+
310
+ ── Utilities ──────────────────────────────────────────────────
311
+ grepos / repos Show all repo clones and their current branch
312
+ testJira / tj Test your Jira API connection
313
+ ghelp This help screen
314
+
315
+ Shortcuts: "m" → master, "d" → develop, ticket number → auto-resolves branch
316
+ EOF
307
317
  }
308
318
 
309
319
  gdiff() { # gdiff [*branch=m] | List files changed for PR to target branch + GitHub compare link