Hacker News new | ask | show | jobs
by jamesponddotco 362 days ago
I live in the terminal, so I wrote my own prompt ages ago when I started learning Go[1][2], and before that I had a simple prompt in bash.

I like to keep things very simple and fast, so the directory and the git branch is all I need. I wonder if people really use all that information or if they set it up thinking they need it, but then never do.

[1]: https://git.sr.ht/~jamesponddotco/gosh

[2]: I should probably update that now that I know a “bit” more Go.

2 comments

I like the host you have that code on. That's refreshing to see a website that doesn't _require_ you to run some javascript.
The only thing I add is the time (hh:mm:ss), it's often-ish useful to roughly know how long a command has been running for (or how long it took after it completed)
The `cmd_duration` starship module can additionally tell you how long the previous command took: https://starship.rs/config/#command-duration