ps1g

Crates.iops1g
lib.rsps1g
version0.0.1
created_at2025-06-16 18:04:33.75498+00
updated_at2025-06-16 18:04:33.75498+00
descriptionprompt generator
homepagehttps://github.com/gabrielfalcao/ps1g
repositoryhttps://github.com/gabrielfalcao/ps1g
max_upload_size
id1714601
size109,126
Gabriel Falcão (gabrielfalcao)

documentation

https://docs.rs/ps1g

README

PS1

Generate configurable colorful PS1 prompt generator for bash

Usage

1. Create a ~/.config/ps1.toml with the following content:

ps1='{220}\u{137}:{220}{cwd:name}{37}{git:branch}{220}${reset}'

2. Add the following snippet to your .bashrc:

eval "$(~/.cargo/bin/ps1 --env)"

Syntax

ANSI Colors

{fg:number} or {number} where number is 0 - 255 - set foreground color {bg:number} where number is 0 - 255 - set background color {reset} reset colors

Current Work Dir Name

{cwd:name}

Git Branch

{git:branch}

How it works

Formal parsing of PS1 escape sequences and {custom:params} is done through the PEG grammar is defined at src/grammar.pest

Commit count: 0

cargo fmt