summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFelicia Hummel <felicia@partkeepr.com>2017-01-26 15:01:17 +0300
committerBen Hilburn <bhilburn@gmail.com>2017-02-19 06:25:33 +0300
commit554f8ed8ee19b6cc34d008ab4b691fad5da376b5 (patch)
tree80dd5df68493cf4b4d62a6b18f282ca39e4a2c44 /README.md
parent95344af32706a35e2da42eefbd3d7f4d5d527122 (diff)
Added support for customizable context segment
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/README.md b/README.md
index c883dbfc..4440ecf6 100644
--- a/README.md
+++ b/README.md
@@ -257,7 +257,14 @@ only print if you are not your 'normal' user (including if you are root), or if
you are SSH'd to a remote host.
To use this feature, make sure the `context` segment is enabled in your prompt
-elements (it is by default), and define a `DEFAULT_USER` in your `~/.zshrc`:
+elements (it is by default), and define a `DEFAULT_USER` in your `~/.zshrc`.
+
+You can customize the `context` segment. For example, you can make it to print the
+full hostname by setting
+```
+POWERLEVEL9K_CONTEXT_TEMPLATE="%n@`hostname -f`"
+```
+
You can set the `POWERLEVEL9K_CONTEXT_HOST_DEPTH` variable to change how the
hostname is displayed. See (ZSH Manual)[http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Login-information]
@@ -269,9 +276,10 @@ end of the hostname.
| Variable | Default Value | Description |
|----------|---------------|-------------|
|`DEFAULT_USER`|None|Username to consider a "default context".|
-|`POWERLEVEL9K_CONTEXT_HOST_DEPTH`|%m|Customizable host depth on prompt.|
|`POWERLEVEL9K_ALWAYS_SHOW_CONTEXT`|false|Always show this segment, including $USER and hostname.|
|`POWERLEVEL9K_ALWAYS_SHOW_USER`|false|Always show the username, but conditionalize the hostname.|
+|`DEFAULT_USER`|None|Username to consider a "default context" (you can also use `$USER`)|
+|`POWERLEVEL9K_CONTEXT_TEMPLATE`|%n@%m|Default context prompt (username@machine). Refer to the [ZSH Documentation](http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html) for all possible expansions, including deeper host depths.|
##### dir