$ echo “A clear sign of madness”
September 13, 2011
What’s a clear sign that I’m a command-line addict? Not only do I have a custom prompt. My prompt is generated by a Python program, which has already grown to over 200 lines. My prompt detects Git and SVN repos, my custom build directory hierarchy, deleted directories at or above $PWD, common usernames and hostnames, shell type and shell level; and it’s still missing some features. What do you think: Is this madness? Does anyone else here use fully custom prompts?
September 13, 2011 at 23:54
I used to try and customise my shell but I’ve switched to oh-my-zsh now and it does pretty much everything I’d like.
Checking your script out the added SVN info looks like a nice addition. I get extra git details but nothing like that for SVN. Might have a stab at updating the SVN plugin to do that.
September 14, 2011 at 01:19
hom>viv>dig>cppsrc (master *%) # it became madness when you have to *wait* for your prompt to appear.
September 14, 2011 at 03:08
I think that such custom prompts are born of a need for such features. Perhaps you can share your custom prompt so we don’t need to spend as much effort to do the same tasks? 🙂
Many people have a default prompt and waste a lot of time doing something that could have already been set up for them.
September 14, 2011 at 08:19
“Perhaps you can share your custom prompt […]?”
See the link in the article.
September 14, 2011 at 06:35
The unicode airplane makes it easy to find the prompt lines when there’s a lot of output on the console:
✈demios:~$
September 14, 2011 at 12:23
Use color in your prompt instead of weird chars that are not included in most monospace fonts?
September 14, 2011 at 07:36
What you need is ZSH and robbyrussell’s oh-my-zsh. Building all that atop is then easy as installing modules in most cases.
But perhaps you are already using it.
September 14, 2011 at 08:21
“What you need is ZSH and robbyrussell’s oh-my-zsh.”
Should take a look at this, but the advantage of using a separate program is that it also works on bash on workstations where zsh is not available.
September 14, 2011 at 11:57
Honestly, how often does that happen?
I used to avoid adding custom aliases, global shortcuts, and changing a lot of stuff just so that it would be simpler if I ever moved to another workstation.
I ultimately concluded that I spend 99.9% of my time on my workspace, and not optimizing it cause of that .1% was insane.
Move to ZSH. All major distros support it. And it’s not like you’ll be crippled if you move to a workstation that doesn’t have it.
September 14, 2011 at 16:51
I am on zsh.
“Honestly, how often does that happen?” About every week, on the cluster where I’m running my computations.
September 14, 2011 at 16:56
Oops. I feel like an idiot now.
Well, for most people it doesn’t happen that frequently.
September 14, 2011 at 12:24
You need zsh and #zsh on irc.freenode.net 😉
oh-my-zsh is nice for beginners, but it gets messy fast. Baking your own is preferable, imo.
September 14, 2011 at 08:47
Very nice. I like the git feature.
From the comment from Harsh i start to think modularizing your script could be really nice to add features.
December 19, 2011 at 15:41
Sorry for my newbie question… I did a quick search with no results.
How can I use that script as my prompt?
Thanks!
December 20, 2011 at 10:11
I’ve just found “PROMPT_COMMAND”. I’ll play with it 😉
Thanks!