Skip to main content

An advanced and easy to configure shell

Project description

build Codacy branch coverage Codacy branch grade license pypi PyPI - Status PyPI - Downloads

ShellP

ShellP is a shell implemented in Python and currently in pre-alpla development.

Usage

Installation

ShellP supports Python 3.6 and newer; make sure you have a supported version. Just run this to install:

pip3 install shellp

If you are not using a supported version, then shame on you.

Running ShellP

You can use python3 -m shellp or shellp to run ShellP. Type exit to exit the shell; ^D won't work since ShellP doesn't like it.

Configuration

You can have a custom configuration script in ~/.shellp/config.py that overrides the default config. Here are the configuration options currently supported:

Name Description
ps1 The prompt that shows before every command you type. See below for the format of ps1.

PS1 Format

ShellP uses Python's str.format() method on ps1 to format it, unlike other shells which use ugly, unreadable escape codes. Here is an example of a config.py that sets the ps1 option:

ps1 = '{style.red}{cwd} {style.yellow}{git_branch} {style.green}{symbol}'

This is the garbage that you would have to put in your .bashrc to get a similar prompt in Bash:

export PS1="\[\e[31m\]\w\[\e[m\] \[\e[33m\]\`parse_git_branch\`\[\e[m\] \[\e[32m\]\\$\[\e[m\] "

You would also have to define parse_git_branch, which takes up a bunch of more lines.

Here are the values you can use in ps1:

Name Description
bell An ASCII bell character
cwd The current directory
git_branch The current git branch, or nothing if you are not in a git repo
hostname The hostname of your computer
shellp_version The installed version of ShellP
symbol # if you are Groot root, otherwise $
style The beautiful_ansi module

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

shellp-0.0.1-py3.7.egg (10.0 kB view hashes)

Uploaded Source

shellp-0.0.1-py2.py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 2 Python 3

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