Print home-relative install paths with ~ prefix#584
Closed
dustinvannoy-db wants to merge 1 commit into
Closed
Conversation
Global-scope installs logged their destination via ${dir#$HOME/}, which
strips the $HOME/ prefix and leaves bare strings like ".gemini/skills"
or ".codeium/windsurf/skills" — making absolute home paths look
project-relative.
Print them as ~/.gemini/skills instead, matching the style already used
by the uninstall plan output.
The replacement text is held in a TILDE variable rather than written as
a literal ~: bash 5.2+ tilde-expands a bare ~ in the replacement of
${var/#pat/~} straight back into $HOME, so the literal form is a silent
no-op there (bash 3.2 handles it, 5.2 does not). The variable form is
correct on both.
Display-only — no install destination or path construction changes.
Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Cosmetic fix to installer success/log output. Three
oklines printed their destination with${dir#$HOME/}, which strips the$HOME/prefix — so global-scope installs logged bare, project-relative-looking strings:Now:
This matches the style already used by the uninstall plan output (
install.sh:771).Lines changed: 2072, 2135 (agent skills), 2492 (MLflow skills), plus the new
TILDEconstant at 85.Note on why this isn't a literal
~The obvious change is
${dir/#$HOME/~}, copying the uninstall-plan idiom. That form is not portable, and would have been a silent no-op for many users:${dir/#$HOME/~}/bin/bash)~/.gemini/skills✅/Users/me/.gemini/skills❌bash 5.2+ tilde-expands a bare
~in the replacement text, turning it straight back into$HOME. Since the installer is commonly run viacurl … | bash— picking up whichever bash is first onPATH— the literal form would leave the confusing output in place on Linux and for Homebrew-bash users. Escaping (\~) fails the other way, emitting a literal backslash on 3.2.Holding the
~in a variable (TILDE="~") suppresses tilde expansion and is correct on both. Verified on both versions.The pre-existing
${p/#$HOME/~}lines in the uninstall path have the same latent issue, but they're out of scope here and left untouched.Verification
bash -n install.shpasses on both 3.2.57 and 5.2.37..gemini/skills,.codeium/windsurf/skills,.gemini/antigravity/skills, and a non-$HOMEproject path (left absolute, as expected).$HOME: log lines print~/…while the real directories are still created at the same absolute paths.git difftouches only display strings plus the new constant — everymkdir -p "$dir",cp -R, andln -sdestination is unchanged.Scope
Display-only. No changes to install destination logic, path construction, scope resolution (
base_dir), antigravity/windsurf/gemini destination computation, orinstall_genie_code_skills.py.This pull request and its description were written by Isaac.