Skip to content

[feat] Add rig status (rs) command#1

Open
mvanhorn wants to merge 1 commit intokronael:masterfrom
mvanhorn:osc/feat-rig-status-command
Open

[feat] Add rig status (rs) command#1
mvanhorn wants to merge 1 commit intokronael:masterfrom
mvanhorn:osc/feat-rig-status-command

Conversation

@mvanhorn
Copy link
Copy Markdown

Problem

rig handles checkout, push, rebase, merge. But there's no way to
know where you are. In detached HEAD workflows, git status shows
"HEAD detached at abc1234" with no branch context.

Solution

Add rig status (rs). Shows current branch, ahead/behind tracking,
uncommitted changes, and recent branch history from reflog.

Reuses existing get_current_branch and recent helpers. No new
dependencies. ~15 lines of bash for the function.

Terminal output

On a feature branch with uncommitted changes:

$ rig status
osc/feat-rig-status-command

Recent:
  osc/feat-rig-status-command → master

On a branch ahead of origin:

$ rs
main  (origin/main, 16 ahead, 2526 behind)

Changes

  • rig/rig: add cmd_status() function and s|status|rs dispatch
  • rig/Makefile: add rs symlink to install/clean targets
  • rig/README.md: add status command to table and usage section

Found this gap while installing and testing rig. The
get_current_branch helper already walks reflog to find branch
names. rs just surfaces that info directly.

This contribution was developed with AI assistance (Claude Code).

Show current branch, ahead/behind tracking, uncommitted changes,
and recent branch history from reflog. Fills the situational
awareness gap in detached HEAD workflows where git status only
shows a commit hash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant