v0.6.0 β moshcode pwd π€
πΈ moshcode v0.6.0 β where am I?
New read-only moshcode pwd (alias where; TUI: /pwd). Shows the current directory and, when you're inside a git repo, the repo name + branch, root, and origin:
~/src/moshcode
repo: moshcode (main)
root: ~/src/moshcode
origin: https://github.com/moshcoder/moshcode.git
- Zero-dependency β reads the
.gitdir directly instead of spawning git, so it works even without git on$PATH. - Walks up to the nearest
.gitand requires a readableHEAD, so a stray/invalid.gitdir (e.g./tmp/.git) is never mistaken for a repo. - Handles worktree/submodule
.gitfiles (gitdir: β¦) and detached HEAD (short sha).$HOMEcollapses to~.