This package allows you to easily customize your PS1 bash prompt
Project description
TOC
PS1 ↑
This program is meant to take the pain out of generating nice bash PS1 prompts.
Pull requests welcome! And if you build an awesome theme, drop something in the examples folder!
Installation ↑
To install this package from pypy run the following command.
pip3 install ps1
License ↑
See: LICENSE
Quickstart ↑
Here's an example to get you up and running!
pip3 install ps1
export PS1="$(ps1 template -t parrot)"
PS1 Command ↑
subcommand listcolors
usage: ps1 listcolors [-h] [--filter [FILTER [FILTER ...]]]
optional arguments:
-h, --help show this help message and exit
--filter [FILTER [FILTER ...]], -f [FILTER [FILTER ...]]
Filter color values
subcommand template
usage: ps1 template [-h] [-t TEMPLATE_NAME] [-l]
optional arguments:
-h, --help show this help message and exit
-t TEMPLATE_NAME, --template_name TEMPLATE_NAME
Template Name
-l, --list List Templates
subcommand custom
usage: ps1 custom [-h] [--add_custom [ADD_CUSTOM [ADD_CUSTOM ...]]] [--add_exit_code [ADD_EXIT_CODE [ADD_EXIT_CODE ...]]]
[--add_git_branch [ADD_GIT_BRANCH [ADD_GIT_BRANCH ...]]] [--add_newline [ADD_NEWLINE [ADD_NEWLINE ...]]]
[--add_user_host [ADD_USER_HOST [ADD_USER_HOST ...]]]
[--add_working_directory [ADD_WORKING_DIRECTORY [ADD_WORKING_DIRECTORY ...]]]
[--set_ends [SET_ENDS [SET_ENDS ...]]] [--set_fancy_lines [SET_FANCY_LINES [SET_FANCY_LINES ...]]]
[--set_no_color [SET_NO_COLOR [SET_NO_COLOR ...]]]
[--set_prompt_color [SET_PROMPT_COLOR [SET_PROMPT_COLOR ...]]]
[--set_section_color [SET_SECTION_COLOR [SET_SECTION_COLOR ...]]]
[--set_section_delim [SET_SECTION_DELIM [SET_SECTION_DELIM ...]]]
optional arguments:
-h, --help show this help message and exit
--add_custom [ADD_CUSTOM [ADD_CUSTOM ...]]
R|ARGS:value,color Add custom section value/color.
--add_exit_code [ADD_EXIT_CODE [ADD_EXIT_CODE ...]]
R|ARGS:ok_txt,err_txt,ok_color,err_color Add Exit code indicator to prompt.
--add_git_branch [ADD_GIT_BRANCH [ADD_GIT_BRANCH ...]]
R|ARGS:color Add git branch to prompt.
--add_newline [ADD_NEWLINE [ADD_NEWLINE ...]]
R|ARGS:None Insert newline.
--add_user_host [ADD_USER_HOST [ADD_USER_HOST ...]]
R|ARGS:user_color,at_sym_color,host_color Add User/Host to prompt. :: [user@hostname]-[section2] ^ add this
--add_working_directory [ADD_WORKING_DIRECTORY [ADD_WORKING_DIRECTORY ...]]
R|ARGS:color Add Working directory to prompt. :: [user@hostame]─[~/path/i/am/in] ^ add this
--set_ends [SET_ENDS [SET_ENDS ...]]
R|ARGS:start,end Set Section start / end values. :: {} {section1}-{section2} [] [section1]-[section2] ❰❱
❰section1❱-❰section2❱
--set_fancy_lines [SET_FANCY_LINES [SET_FANCY_LINES ...]]
R|ARGS:value Set fancy line breaks like the following :: ┌─── ├─── └──╼
--set_no_color [SET_NO_COLOR [SET_NO_COLOR ...]]
R|ARGS:value Set terminal to no color.
--set_prompt_color [SET_PROMPT_COLOR [SET_PROMPT_COLOR ...]]
R|ARGS:color Set prompt color. :: i.e. $ or # depending on user
--set_section_color [SET_SECTION_COLOR [SET_SECTION_COLOR ...]]
R|ARGS:color Set default section color.
--set_section_delim [SET_SECTION_DELIM [SET_SECTION_DELIM ...]]
R|ARGS:delim Set section separator. :: i.e. [section1]-[section2] ^ separator
subcommand examples
usage: ps1 examples [-h]
optional arguments:
-h, --help show this help message and exit
Examples ↑
entropy.sh
parrot.sh
skulls.sh
purplegoblin.sh
plainjane.sh
greenguy.sh
filecount.sh
magenta.sh
powderpuff.sh
fire_ice.sh
Other Docs ↑
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ps1-0.0.3.tar.gz
(10.6 kB
view hashes)