zsh-users
 help / color / mirror / code / Atom feed
From: Julius Plenz <jp@cvmx.de>
To: ZSH-users <zsh-users@sunsite.dk>
Subject: Re: Coolest prompt?
Date: Tue, 15 Jun 2004 17:18:40 +0200	[thread overview]
Message-ID: <20040615151840.GC7673@cvmx.de> (raw)
In-Reply-To: <87CE3664-BBF7-11D8-9BE4-000393ABF2F0@chemistry.ucsc.edu>

* William Scott <wgscott@chemistry.ucsc.edu> [2004-06-12 00:50]:
> My prompt: %

Well,...

> I keep the prompt simple

I see. I also like simple prompts, but a _bit_ more infos are ok.  ;-)
Therefore my prompt looks like this (relevant parts, be careful with wraps):

precmd () {
 TMPPATH="        "$PWD
 SHORTPATH=${(M)TMPPATH%???????????}
 PS1=$(echo "%{\033[0;36m%}$SHORTPATH%{\033[0m%},%{\033[0;31m%}%j%{\033[0m%}%% ")
}

To see this Prompt in action, look at this example:

e/www/plenz,0% cd www/
w/plenz/www,0% cd plenz.com/
w/plenz.com,0% cd /tmp
       /tmp,0% sleep 10&
[1] 16056
       /tmp,1% cd
[1]  + 16056 done       sleep 10
e/www/plenz,0%

So, you see, there is a fixed path-length and the number of
background jobs. I really like this prompt, its simple but gives
enough information.

Julius
-- 
www.plenz.com


  reply	other threads:[~2004-06-15 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-11 10:29 Ziggy
2004-06-11 12:07 ` Thomas Köhler
2004-06-11 21:20 ` Aaron Davies
2004-06-11 22:34 ` William Scott
2004-06-15 15:18   ` Julius Plenz [this message]
2004-06-17 12:25     ` Vincent Lefevre
2004-06-17 17:50 ` Sami Samhuri
2004-06-18 16:08 ` Sartoo
2004-07-08  1:15 ` Geoff Wing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040615151840.GC7673@cvmx.de \
    --to=jp@cvmx.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).