zsh-workers
 help / color / mirror / code / Atom feed
* Contribution: prompt leah2
@ 2017-07-31 20:14 Leah Neukirchen
  0 siblings, 0 replies; only message in thread
From: Leah Neukirchen @ 2017-07-31 20:14 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-31 20:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 20:14 Contribution: prompt leah2 Leah Neukirchen

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).