From: Leah Neukirchen <leah@vuxu.org>
To: zsh-workers@zsh.org
Subject: Contribution: prompt leah2
Date: Mon, 31 Jul 2017 22:14:44 +0200 [thread overview]
Message-ID: <87o9s0jrd7.fsf@gmail.com> (raw)
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.
\f
# leah2 prompt theme
# by <leah@vuxu.org>
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 "$@"
\f
Enjoy,
--
Leah Neukirchen <leah@vuxu.org> http://leah.zone
reply other threads:[~2017-07-31 20:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87o9s0jrd7.fsf@gmail.com \
--to=leah@vuxu.org \
--cc=zsh-workers@zsh.org \
/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).