Skip to main content
100%

Gist 614541

✓ Published0🌍 Public
DDylanFM
Last edited Oct 7, 2010
Created on Oct 7, 2010

This example visualizes a command-line prompt configuration that dynamically displays the current Git branch and working-directory status in color. It shows how the prompt turns red when uncommitted changes exist and green when the working directory is clean. The shell script uses `parse_git_branch` with `sed` and `awk`-style piping to extract branch names, while `check_git_changes` relies on `git status` and `tput setaf` to set terminal colors. The PS1 variable composes the final prompt, embedding the branch name and status indicator between the directory path and a colon. It relies on standard Bash and Git command-line tools, not a visualization library.

AI-generated description

Similar vizzes