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.

Files for shellp, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size shellp-0.0.1-py2.py3-none-any.whl (12.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size shellp-0.0.1-py3.7.egg (10.0 kB) File type Egg Python version 3.7 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page