Skip to content

zimfw/hometown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hometown

A fork of the Hometown Prompt theme.

What does it show?

  • Line break if ${HOMETOWN_LINEBREAK_BEFORE_PROMPT} is non-zero.
  • username@hostname when 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.
    • UU unmerged files indicator.
    • _D unindexed deleted files indicator.
    • _M unindexed 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.
  • # when root, % otherwise. Character color varies whether last command returned 0 or not.

Settings

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

Requirements

Requires Zim Framework's prompt-pwd module to show the current working directory, and git-info to show git information.

License

Hometown Prompt by Henry Bley-Vroman is licensed under HL3-ECO-EXTR-MEDIA-MIL-SV-USTA and CC BY-NC-SA 4.0.

Releases

No releases published

Packages

 
 
 

Contributors

Languages