SIGN IN SIGN UP

fix(completion): restore .bashrc byte for byte on bash uninstall (#1872)

* fix(completion): restore .bashrc byte for byte on bash uninstall

Uninstall removed the OpenSpec block but kept the blank separator line
install adds after it at the top of .bashrc, then popped every trailing
blank line and wrote the file back without its final newline. The next
tool to append with >> (nvm, conda, rustup) merged its first line into
the user's last line.

Drop only the separator line install added when the block sits at the
top, and leave the rest of the file, including its final newline,
trailing blank lines and CRLF line endings, as it was.

* test(completion): cover content right after the block and CRLF without final newline

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Clay Good <hi@claygood.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
D
Dwin Gharibi committed
72bf7600a5f7bdf74d6387e163577086fb4c68e0
Parent: 388d344
Committed by GitHub <noreply@github.com> on 9/16/2026, 3:47:43 PM