agkozak / agkozak-zsh-prompt

A fast, asynchronous Zsh prompt with color ASCII indicators of Git, exit, SSH, virtual environment, and vi mode status. Framework-agnostic and customizable.
MIT License
292 stars 26 forks source link

Request: parameters for custom pre- and post- CWD chars #41

Open AndydeCleyre opened 1 year ago

AndydeCleyre commented 1 year ago

Without needing to assemble a full custom prompt component array, it would be useful to specify some arbitrary content to precede and follow the current working directory component.

For example, one might prefix with a folder icon, and maybe some spaces:

AGKOZAK_PRE_DIR_CHAR='  '

or maybe put it in a "bubble":

AGKOZAK_PRE_DIR_CHAR='%F{#081937}%K{#081937}%F{green}'
AGKOZAK_POST_DIR_CHAR='%F{#081937}%k%f'
AndydeCleyre commented 1 year ago

I would also like to use this to italicize the directory, with \e[3m and \e[0m. Though I tried adding those directly in the source and they always came out literally on the other side, so maybe italics would need their own handling, meaning I should open a separate issue?