-
Notifications
You must be signed in to change notification settings - Fork 40
Prompt variables
Chawye Hsu edited this page Apr 19, 2018
·
9 revisions
Prompt variables are set either by pshazz itself, or by a plugin. So plugin variables are only available when that plugin is enabled in the current pshazz theme.
Need more variables? Create a GitHub issue to let me know.
-
$dir
: the name of the current working directory (without the base path) -
$path
: the full path of the current working directory, with the home directory displayed as ~ -
$user
: the username of the current user -
$hostname
: the name of the host/computer
Plugin variables are prefixed with the name of the plugin.
These are only displayed when the working directory is inside a git repo.
-
$git_branch
: the name of the current git branch -
$git_dirty
: displays an indicator if the git working tree has modifications. You can specify the indicator string displayed by setting agit.prompt_dirty
string inside the theme file. -
$git_lbracket
: the left bracket around git info, e.g '[' -
$git_rbracket
: the right bracket around git info, e.g ']'
These are only displayed when the working directory is inside a Mercurial repo.
-
$hg_branch
: the name of the current Mercurial branch -
$hg_dirty
: displays an indicator if the working tree has modifications. You can specify the indicator string displayed by setting ahg.prompt_dirty
string inside the theme file. -
$hg_lbracket
: the left bracket around Mercurial info, e.g '[' -
$hg_rbracket
: the right bracket around Mercurial info, e.g ']' -
$hg_bookmark
: displays "at [bookmark]" if there is a bookmark
Virtualenv plugin variables
These are only displayed when the working directory has activated the virtualenv.
-
$virtualenv_lbracket
: the left bracket around Virtualenv info, e.g '[' -
$virtualenv_rbracket
: the right bracket around Virtualenv info, e.g ']' -
$virtualenv
: the Virtualenv name that currently activated