Skip to main content

Generate customised shell prompts (for ZSH)

Project description

Advanced shell prompts for ZSH.

PyPI PyPI - License

Usage

Install it:

pip install --user makeprompt

Put this in your ~/.zshrc:

autoload -Uz promptinit
promptinit
prompt off
setopt PROMPT_SUBST

PROMPT='$( ~/.local/bin/makeprompt )'

Features

  • Display user/hostname/path using truecolor (24-bit) colors

  • 8-bit color fallbacks, for terminals that don’t support truecolor

  • git repository status information (branch, dirty)

  • Python enabled virtualenv information

  • Background (stopped) jobs count

Customize

The MAKEPROMPT_COLORS environment variable can be used to change colors of different parts of the prompt.

Format is similar to LS_COLORS, for example:

export MAKEPROMPT_COLORS='user=38;2;56;142;60:host=38;2;198;255;0'

A utility script is provided to conveniently generate TrueColor paletters from HTML hex colors.

For example:

python -m makeprompt.utils.make_truecolor_palette user='#808' host='#f0f' path='#ff0'

you can also use this in your shell configuration:

eval $( python -m makeprompt.utils.make_truecolor_palette ... )
export MAKEPROMPT_COLORS

Development

To test a development version, checked out in ~/Projects/makeprompt:

PROMPT=’$( PYTHONPATH=”$HOME”/Projects/makeprompt python -m makeprompt )’

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

makeprompt-0.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

makeprompt-0.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file makeprompt-0.3.tar.gz.

File metadata

  • Download URL: makeprompt-0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for makeprompt-0.3.tar.gz
Algorithm Hash digest
SHA256 0d4f3f9254bb6f196ef63b6956a743cb123ca1b6ee00620d379915bc8cd7ef91
MD5 077fb72cda2a83506b21af5fe42f08e5
BLAKE2b-256 af9d594c37804a23e518a1d036fd88ad64e22d95c359e6723a1d9441d22f81a0

See more details on using hashes here.

File details

Details for the file makeprompt-0.3-py3-none-any.whl.

File metadata

  • Download URL: makeprompt-0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for makeprompt-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b5f82ba68c0b906707b3f46ee9ef32e997466477fdde4f067b2d2d0bdd6d1d5
MD5 4e1ba3ac4af28a92f78c9f0d62a5a209
BLAKE2b-256 a0d0e4087a698ce9733cb6bc7f58cf30f8a1c7503edffafa52d3181b46796726

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page