A fork of the Hometown Prompt theme.
- Line break if
${HOMETOWN_LINEBREAK_BEFORE_PROMPT}is non-zero. username@hostnamewhen in an SSH session.${HOMETOWN_CUSTOM}, if non-empty.- The current working directory and its parent. When in a git repo, the repo root directory is underlined when shown.
- Git information when you are in a git repo:
- Line break if
${HOMETOWN_LINEBREAK_BEFORE_GIT_REF}is non-zero. - Git branch name, or commit short hash when in 'detached HEAD' state.
+and/or-indicators when there are commits ahead and/or behind of remote, respectively.- Name of tag that contains current commit when in 'detached HEAD' state.
- Line break if
${HOMETOWN_LINEBREAK_AFTER_GIT_REF}is non-zero. $indicator when there are stashed states.??untracked files indicator.UUunmerged files indicator._Dunindexed deleted files indicator._Munindexed modified files indicator.A_indexed added files indicator.D_indexed deleted files indicator.M_indexed modified files indicator.R_indexed renamed files indicator.- Git action, when there's an operation in progress.
- Line break if
#when root,%otherwise. Character color varies whether last command returned 0 or not.
This theme can be customized with the following environment variables. If a variable is not defined, the respective default value is used.
| Variable | Description | Default value |
|---|---|---|
| HOMETOWN_CUSTOM | Displayed before the working directory, if non-empty. Can be defined using prompt expansion escape sequences. The default value expands to the current time of day in 24-hour format, with seconds. | %* |
| HOMETOWN_LINEBREAK_BEFORE_PROMPT | If non-zero, the prompt is preceded by a line break. | 1 |
| HOMETOWN_LINEBREAK_BEFORE_GIT_REF | If non-zero, the git ref info is preceded by a line break. | 0 |
| HOMETOWN_LINEBREAK_AFTER_GIT_REF | If non-zero, the git ref info is followed by a line break. | 1 |
Requires Zim Framework's prompt-pwd module to show the current working directory, and git-info to show git information.
Hometown Prompt by Henry Bley-Vroman is licensed under HL3-ECO-EXTR-MEDIA-MIL-SV-USTA and CC BY-NC-SA 4.0.