Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mine is even simpler...

'> %d ' (yes, I use zsh)

Root has '# %d '

Am I odd? I generally find I don't need /that/ much information on the shell.



ha. mine is:

  ~> 
although it gets progressively richer with heightened context, e.g:

   username if not my account
   hostname if ssh'ing
   basename(pwd) (not full path) if not ~
   HEAD value (ref or sha) if in git or hg
   literal rebase & al for stateful git operation in progress
   any of ! ≠ ± (untracked, unstaged, and staged changes)
   any of literal nix venv when entering specific contexts
at some point I had it as simple as > but some situations had me wish I knew context right away so I progressively added these each time I had a "fuck, I made a mistake and I would not have if I had that bit of context"

I thought I'd go all the way to

  ;
plan9 rc-style which made sense because "select whole line then paste and run" just works. plus it looks like a wink.

I do have colours in a few select areas, but very limited, so that when there are colours they are very meaningful. notably the prompt segments are colour coded by meaning since they're dynamic. my vim theme looks like e-ink, merely getting fancy with a shade of gray for comments (which at some point could be reverted so thar comments get the "focus" and code is toned down, very literal programming)

oh and please: no right prompt, ever (or $COLUMNS-wide left prompt) as it gets wild when resizing; no freaking emoji in my output (e.g I still have that HOMEBRE_NO_EMOJI env var set to an expletive of sorts even though I don't use homebrew anymore)


I do the same – starting out simple then adding context – but with:

: ▶

The colon (normally) acts as a no-op, so if you copy and paste an entire line including the prompt and run it, it does nothing.


Hah, my ~minimalist variant must look outright flashy compared to yours. Thus:

    PS1='%U%m%u:%B%30<..<%~%b%% '
I like to know which host I'm on directly from the shell prompt, as well as the trail end of CWD. You could get close to the same with just '%30d' but then I'd lose the visual cues. And it must have been that way for at least 15 years.


I use ... for user and []_ for root, I would rather not fill up terminal space with information I generally know. I really hate when the prompt causes things to wrap and I do not mind putting pwd or the like to use on those occasions I do not know.


I like to get exit codes, but otherwise yeah that's fine.


Mine starts the prompt with =^_^= when the last command succeeded and a red (x_x) when it failed.


heh, cute, that reminds me of the classic mac boot rom screen.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: