Created:        2025-03-28 Fri
Last modified:  2025-03-28 Fri

Bash Prompt Customization: PS1, PROMPT_COMMAND

Aspect

Function Call via PS1

Function Call via PROMPT_COMMAND

Purpose

Embeds function output into the prompt display.

Executes a function to perform actions before displaying the prompt.

State Changes

Typically has no lasting state changes beyond prompt appearance.

Can alter shell state or environment, affecting subsequent commands.

References