5 ms·
An adaptive prompt for Bash and Zsh
- sokrates 13y agoLove it, thanks for sharing!
- mcmire 13y agoThat is way too much information for me personally (I am distracted enough as it is, and I believe real-time data like battery level belongs in your menu bar, not the terminal) but I can see how it would be useful to some.
- stonith 13y agoIf you look under features configuration there's options for turning a lot of it off. I agree that the majority probably isn't useful unless you're running without a window manager for some reason, but even just the VCS info is pretty neat.
- nbouscal 13y agoWindow manager doesn't necessarily imply menubar. For example, with xmonad, you don't have a menubar unless you install xmobar. This could be an alternative to that, though admittedly that's a really obscure use case. For me, most of this I don't want, and some I already have (git repo stuff), but some is new and potentially really convenient, especially the stuff for number of sleeping/background jobs.
- virtualwhys 13y agoYeah, Conky or similar status bar window manager widget is better for me for the real-time data (battery, cpu temp, date/time, etc.); too much to visually parse otherwise. Definitely some nice features in here at first glance (colored directory perms and colored root vs. normal user are real nice-to-haves for example).
- nojhan 13y agoThat's amusing, because I've started liquidprompt for this very specific reason: I was constantly missing the battery notification icon. Time seems to have trained my brain not to look at this screen area. Fortunately, with liquidprompt alerts are spoting just where I look at, and only when necessary.
- AdamGibbins 13y agoThis has nothing specific to OS X, unsure to why OS X is in the title.
- edu 13y agoSome admin should fix it: it's for Bash and ZSH.
- nojhan 13y agoTo be honest, just because I've tried to pass this link in hackernews several times without success, with different combination of keywords/users. I was a little bit shameful at the beginning, but the overwhelming success (from the perspective of this very little software: github stars * 2) is interesting. It seems that some keywords are more efficient than others. Let's consider this practice as social engineering.
- mofle 13y agoSome time back I created my own ZSH prompt as I wanted something fast and minimal, where most others were too feature rich. It's also a good base if you want to create your own. https://github.com/sindresorhus/pure https://github.com/sindresorhus/pure
- michaelhoffman 13y agoThis is much more appealing to me.
- patrickod 13y agowhat version of ZSH are you using? I'm having issues installing this on Ubuntu where the metadata commands aren't executing and are instead printed as $vcs_info_msg_0_`git_dirty` $username `cmd_exec_time`
- drivebyacct2 13y agoNot my screenshot (and I use Tango with Konsole) but I like the agnoster+zsh combo.
- ralph 13y agoI use PS1='$ ' on the local machine and 'foo$ ' if I've ssh'd to foo. I prefer this because: the location of the cursor is more fixed, it doesn't wander across the columns as the environment changes, so my eye finds it more quickly; I've a decent amount of line left before it wraps at the end of the terminal, and I often type 100+-character pipelines on the fly; a couple of taps of Enter gives almost blank lines that logically separate when needed.
- wereHamster 13y agoSolution to that: multi-line prompts. First line with lots of info, second line just '$ '. Or RPROMPT if you are using zsh ([...] RPROMPT parameter. If this is set, the shell puts a prompt on the right side of the screen.)
- ralph 13y agoThat wouldn't give the sequence of almost-blank lines I find most helpful. It would also merge the first, long, line of the prompt with the tail of the previous command's output.
- arhayward 13y agoI've been using (a slightly modified version of) https://github.com/dotcode/multi-shell-repo-prompt https://github.com/dotcode/multi-shell-repo-prompt for a while now. Conveys what I consider to be relevant, anyway.
- philh 13y agozsh has RPROMPT, which displays on the right of your prompt and gets overwritten if you write a long command. I use it to show the last command's exit status and my current git branch, effectively without taking up space.
- rdl 13y agoA bit busy for me. I stick to time@host:dir and then a symbol for security level (root, admin, role, personal, daemon, test). Thinking about doing different color schemes for different hosts, too.