From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18637 invoked by alias); 31 Jul 2017 20:15:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41478 Received: (qmail 12581 invoked from network); 31 Jul 2017 20:15:13 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(1.3/5.0):. Processed in 2.761335 secs); 31 Jul 2017 20:15:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Leah Neukirchen Subject: Contribution: prompt leah2 Date: Mon, 31 Jul 2017 22:14:44 +0200 Message-ID: <87o9s0jrd7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Hi, I recently helped a new user to get on zsh, and wanted to show them the prompt framework to get a nice configuration quickly... unfortunately most of the prompts there are either utterly bloated or don't show off the power of zsh at all. I thereby contribute a basic, uncontroversial version of my own prompt. I think it would make a good addition to the existing prompts, and could serve as a starting point for other users. # leah2 prompt theme # by prompt_leah2_help () { cat <<'EOF' Simple single line prompt which tries to display only the information you need: - status if last command had non-zero status - number of background jobs if non-zero - two last segments of cwd - prompt sigil is doubled when logged in via SSH, and red when root I usually use this in a white on black terminal. EOF } prompt_leah2_setup () { PS1='%B%m%(?.. %??)%(1j. %j&.)%b %2~%B%(!.%F{red}.%F{yellow})%#${SSH_CONNECTION:+%#} %b%f' PS2='%_%B%(!.%F{red}.%F{yellow})> %b%f' prompt_opts=( cr percent subst ) } prompt_leah2_setup "$@" Enjoy, -- Leah Neukirchen http://leah.zone