Skip to content

These docs are for the newly-released v4.

If you are or were using v3, check out What's New. If you are or were using v3 and do advanced configuration, read the migration guide and/or read about pinning v3.x.

 

 

Options

Hometown Prompt is made almost entirely of Git Prompt Kit components. So almost all configuration —color customization, symbol customization, dimming vs hiding inactive elements, the number of path segments shows, etc.— is done by configuring through Git Prompt Kit. (Git Prompt Kit is bundled with Hometown Prompt, so no additional download is necessary.)

TIP

Read about Git Prompt Kit’s options in the Git Prompt Kit’s options documentation. And play with Hometown Prompt’s options and Git Prompt Kit’s options in the Hometown Prompt interactive demo!

Content

OptionAdded InDefaultTypeDescription
3.0.0'%*'stringDisplayed at the start of the prompt, before the working directory. In the terminal, this is printed with prompt expansion with PROMPT_SUBST and PROMPT_PERCENT. Need it to be dynamic? Define it in a precmd hook.
3.0.01integerIf non-zero, show the stash count, assume-unchanged file count, and skip-worktree file count
4.0.01integerIf non-zero, Hometown will set the psvar array's first five elements, to the time, the exit code-dependent prompt character color, the prompt character, the drawn-at date, and whether the drawn-at date is different from the current date. These are used by the default HOMETOWN_TRANSIENT_PROMPT_ENV and scheduled refresh.

Layout

OptionAdded InDefaultTypeDescription
3.0.01integerIf non-zero, the Git ref info* is followed by a line break
4.0.01integerIf non-zero, the prompt is preceded by a line break. See also Advanced.
4.0.01integerIf non-zero, there is no linebreak before the first prompt in a session, regardless of HOMETOWN_LINEBREAK_BEFORE_PROMPT. See also Advanced.
3.0.01integerIf zero, the Git ref info* is preceded by a line break

Scheduled refresh

OptionAdded InDefaultTypeDescription
4.0.0(( HOMETOWN_SET_PSVAR && ! psvar[5] )) && _hometown_set_date_psvar; _git_prompt_kit_update_gitfunctionFunction run every HOMETOWN_REFRESH_INTERVAL
4.0.00integerIf non-zero, run HOMETOWN_REFRESH_FUNCTION every this many seconds.

Transient prompt

OptionAdded InDefaultTypeDescription
4.0.0( [GIT_PROMPT_KIT_CWD_MAX_TRAILING_COUNT]-0 [GIT_PROMPT_KIT_HIDE_INACTIVE_AHEAD_BEHIND]-1 [GIT_PROMPT_KIT_HIDE_INACTIVE_EXTENDED_STATUS]-1 [GIT_PROMPT_KIT_HIDE_TOOL_NAMES]-1 [GIT_PROMPT_KIT_SHOW_INACTIVE_STATUS]-0 [GIT_PROMPT_KIT_SYMBOL_CHAR_NORMAL]-$' ' [GIT_PROMPT_KIT_SYMBOL_CHAR_ROOT]-$' ' [HOMETOWN_CUSTOM]-'%F{%2v}%3v%f %(5V.%5v %v - %W %*.%v-%*)' [HOMETOWN_LINEBREAK_AFTER_GIT_REF]-0 [HOMETOWN_LINEBREAK_BEFORE_PROMPT]-0 [HOMETOWN_NO_LINEBREAK_BEFORE_GIT_REF]-1 )associative arrayConfiguration context applied to transient prompt. Default value assumes HOMETOWN_SET_PSVAR is non-zero.
4.0.01integerIf non-zero, there will be a transient prompt

* Git ref info is branch or commit, ahead/behind counts, remote name(s), and tag. See the GIT_PROMPT_KIT_REF docs.