![](/static/66c60d9f/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/01051da8-fe3a-41e2-a59a-c3a73fd7acda.png)
Moving the cursor will confuse bash and you can get the same effect by just omitting the last \n.
When I was testing it I did not get the same effect. Instead it would only put the background behind what I had typed and not the whole line. Doing it now it seems to be working with the omission. I would assume it’s a terminal emulator bug because I believe I have changed emulators since I wrote it. I’ve now removed it, thanks for fixing a bug.
Avoid doing external commands in subshells when there’s a perfectly good prompt-expansion string that works.
I wanted my home directory to not get shortened to ~
, and if there is some way to do that with \w
it isn’t easy to find out how.
Also, what’s the reasoning for avoiding it (besides it being idiomatic)? I’m sure there is one, but I don’t think I’ve run into it yet.
You seem to be generating several unnecessary blank lines
I just like the look of it, and I have the screen space to do it.
Huh. When I took Calculus II in community college, the professor introduced sum notation and like 2/3 of the class was like “wow that’s cool I didn’t know about that”. I don’t remember ever being formally taught it before that but it still surprises be how few people where already familiar with it.