Re:My Extravagant Zsh Prompt
by JoshTriplett on Saturday March 19, 2011 @02:35AM
(#2343111)
I took the minimal approach with my prompt. Under normal circumstances, my prompt looks like this:
~$
I only show the username and hostname in my prompt if remote or unusual: [ -n "$SSH_CONNECTION" ] || [ "$USER" != "josh" ]. If either of those, I prefix my prompt with "user@host:". Apart from that, I show the exit status of the last command run, if non-zero. In general, I try to hide all boring information and show useful information only.
Re:My Extravagant Zsh Prompt
by grayrest on Friday March 18, 2011 @10:11PM
(#2342771)
If anybody's interested, here's my considerably less extravagant Zsh prompt[1]. It shows the current directory along with what top level directory you're in on the right prompt along with VCS info. The left side shows backgrounded jobs marked with pipes but otherwise is just a $ so command lines wrap less frequently. It uses the vcs_info functionality from zshkit[2].
Re:My Extravagant Zsh Prompt
by jodrellblank on Friday March 18, 2011 @11:52PM
(#2342928)
Because he works "from coffeeshops and client meetings pretty often, so it’s nice to have a reminder of my remaining battery power to know when I need to plug in". Didn't you read it?
Re:My Extravagant Zsh Prompt
by billmcneale on Saturday March 19, 2011 @01:50AM
(#2343060)
I agree. There is a lot of screen estate these days, even on laptops, so why not save the shell window for stuff that is actually useful in the shell window and that can only be displayed in that window?
The current git branch makes sense, as does the current directory, but I'm having a hard time finding the point in anything else cluttering my shell window.
Re:My Extravagant Zsh Prompt
by there on Saturday March 19, 2011 @11:21AM
(#2343779)
because his command prompt runs so many extra commands and causes so much disk activity every time he hits enter, it wastes battery quick enough that he needs to monitor it.
[1] http://gr.ayre.st/s/screenshots/git/git_working.png [2] https://github.com/mattfoster/zshkit
I used to pull in mattfoster's stuff, but I got complacent and fell out of it.
The current git branch makes sense, as does the current directory, but I'm having a hard time finding the point in anything else cluttering my shell window.
➜ civ5replays git:(master) ✗
Looks like that now, the X means uncommited changes. civ5replays being the folder, the rest being... the rest!
If you exit `top` by pressing q, it exits with non-zero - who knew? :)
[1]: http://sebastiancelis.com/2009/11/16/zsh-prompt-git-users/