Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used oh_my_zsh (and tinkered with bash_it) on multiple systems and have generally been happy with it, though I hate it's auto-correction feature and generally turn it off.

My usual shell is zsh and I really want just three things from my prompt:

  1. Current directory/or pwd.

  2. Git status and branch.

  3. Color output from ls (on the ls command, not in the prompt).

The rest is just bling and is often irritating.

By using these shell scripts I am paying too much in cpu cycles for what I want.

Any suggestions, either with using these scripts or as a separate shell script. I am OK with either zsh or bash.


share|improve this question

closed as off-topic by jasonwryan, slm, Anthon, Zelda, Runium Jan 17 '14 at 4:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – jasonwryan, slm, Anthon, Zelda, Runium

Why do you want "colour output from ls" in your prompt?... – Sardathrion Mar 19 '12 at 12:36
You could extract the for you relevant parts from the zsh config of grml (grml.org/zsh ). – jofel Mar 19 '12 at 12:51
Not really in the prompt but I do want color output from ls. I guess it is not so much a prompt issue but I know it does involve some shell scripting. – haziz Mar 19 '12 at 12:51
Also asked on AskUbuntu: askubuntu.com/q/114227/10127 – glenn jackman Mar 19 '12 at 13:22
up vote 2 down vote accepted

To have colored output from ls, use the alias ls='ls --color=always'. You can enable this with

alias ls='ls --color=always'

As for having your current directory in your prompt:


To add git status to you prompt, take a look at this.

share|improve this answer
--color=auto should of course DTRT if the detection works. – XTL Mar 20 '12 at 10:16

I use this script from git/contrib with bash. It gives me git branch and autocompletion as well. git status can be hacked in pretty easily too, from what I understand.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.