commit 88ea9d320a421464117d7774ff3b954a593855da
parent 006d01eb6535f823319fc944140bf60952ed169a
Author: Nick Moffitt <nick@zork.net>
Date: Wed, 20 May 2026 09:13:29 +0100
link bigger prompt systems
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spacehobo.mdwn b/spacehobo.mdwn
@@ -8,7 +8,7 @@ Check out my neat `bash` prompt, which I put in eik's `/etc/bash_completion.d/pr
* [Prompt Engineering](https://git.permacomputing.net/prompt-engineering/files.html)
-The `$PS1` text expansion environment is fairly limited. It can do parameter expansion, reference expansion, arithmetic expansion, and a couple other neat tricks. You can shell out, but if you do that it can overwrite the variable that contains the last exit code (`$?`). A lot of heavyweight systems like powerline or starship will tuck this data away before running loads of programs every time you hit return at the shell. I wanted to see if I could do more with less.
+The `$PS1` text expansion environment is fairly limited. It can do parameter expansion, reference expansion, arithmetic expansion, and a couple other neat tricks. You can shell out, but if you do that it can overwrite the variable that contains the last exit code (`$?`). A lot of heavyweight systems like [powerline](https://github.com/b-ryan/powerline-shell) or [starship](https://starship.rs/) will tuck this data away before running loads of programs every time you hit return at the shell. I wanted to see if I could do more with less.
Tools such as the `$(__git_ps1)` hacks do their best to only use features of bash that work internally to bash itself. They make internal functions that try not to fork off processes if they can help it. I was inspired by the Debian `$PS1`'s handling of their `$debian_chroot` variable, and decided to try and make a dynamic prompt that only shows information if it's relevant.