Skip to content

Commit 8c55497

Browse files
committed
Documentation for v3.1
1 parent 52c4ce2 commit 8c55497

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,21 @@ This prompt has been tested on numerous Linux and BSD distributions, as well as
2929
- [Exit Status](#exit-status)
3030
- [`vi` Editing Mode](#vi-editing-mode)
3131
- [Customization](#customization)
32+
- [Custom Colors](#custom-colors)
3233
- [Blank Lines Between Prompts](#blank-lines-between-prompts)
3334
- [Optional Single-line Prompt](#optional-single-line-prompt)
3435
- [Optional Left-prompt-only Mode](#optional-left-prompt-only-mode)
3536
- [Custom Prompt Character](#custom-prompt-character)
36-
- [Custom Colors](#custom-colors)
37+
- [Custom Git Symbols](#custom-git-symbols)
3738
- [Advanced Customization](#advanced-customization)
3839
- [Asynchronous Methods](#asynchronous-methods)
3940

4041
## News
4142

43+
- v3.1 (February 5, 2019)
44+
- The array `AGKOZAK_PROMPT_CHAR` allows the user to specify prompt characters for regular user, superuser, and `vi` command mode.
45+
- Setting `AGKOZAK_COLORS_PROMPT_CHAR` can change the color of the prompt character.
46+
- The array `AGKOZAK_CUSTOM_SYMBOLS` contains user-specified symbols for displaying the Git status.
4247
- v3.0.2 (December 26, 2018)
4348
- The external command `cat` is no longer used.
4449
- The prompt now uses [the latest commit](https://github.com/mafredri/zsh-async/commit/43de5e0738eaf366dfde4d0a204de655de16f18b) of `zsh-async`.
@@ -188,6 +193,17 @@ This prompt will work perfectly if you use the default ZSH Emacs editing mode; i
188193

189194
In addition to setting `AGKOZAK_PROMPT_DIRTRIM` and `AGKOZAK_NAMED_DIRS` to change how the working directory is displayed ([see above](#abbreviated-paths)), you may use other settings to alter how the prompt is displayed.
190195

196+
### Custom Colors
197+
If you would like to customize the prompt colors, change any of the `AGKOZAK_COLORS_*` variables from their defaults to any valid color and add it to your `.zshrc`. The following are the available color variables and their defaults:
198+
199+
AGKOZAK_COLORS_EXIT_STATUS=red
200+
AGKOZAK_COLORS_USER_HOST=green
201+
AGKOZAK_COLORS_PATH=blue
202+
AGKOZAK_COLORS_BRANCH_STATUS=yellow
203+
AGKOZAK_COLORS_PROMPT_CHAR=white
204+
205+
![Custom colors](img/colors.gif)
206+
191207
### Blank Lines Between Prompts
192208

193209
If you prefer to have a little space between instances of the prompt, put `AGKOZAK_BLANK_LINES=1` in your `.zshrc`:
@@ -214,7 +230,7 @@ If you would like to have the Git status displayed in the left prompt (with no r
214230

215231
### Custom Prompt Character
216232

217-
The classic prompt for Bourne-style shells is `$`; for `csh` it is `%`, and ZSH borrows the latter because it inherits features from both sorts of shell. agkozak-zsh-prompt uses `%` to show where the prompt ends and where input should begin, although a superuser will see `#`, and either sort of user will see `:` when `vi` command mode is active. If you wish to change any or all of these symbols, you may do so using the array `$AGKOZAK_PROMPT_CHAR`, whose three elements are 1) the normal prompt character; 2) the superuser prompt character; and 3) the `vi` command mode character. The default behavior of the prompt can be represented as
233+
The classic prompt for Bourne-style shells is `$`; for `csh` it is `%`, and ZSH borrows the latter because it inherits features from both types of shell. agkozak-zsh-prompt uses `%` to show where the prompt ends and where input should begin, although a superuser will see `#`, and either sort of user will see `:` when `vi` command mode is active. If you wish to change any or all of these symbols, you may do so using the array `AGKOZAK_PROMPT_CHAR`, whose three elements are 1) the normal prompt character; 2) the superuser prompt character; and 3) the `vi` command mode character. The default behavior of the prompt can be represented as
218234

219235
AGKOZAK_PROMPT_CHAR=( %# %# : )
220236

@@ -235,22 +251,19 @@ which would be the equivalent of
235251

236252
AGKOZAK_PROMPT_CHAR=( '%F{magenta}❯%f' '%F{magenta}❯%f' '%F{magenta}❮%f' )
237253

238-
Note that you could change one of those `%F{magenta}` strings to another foreground color for a more striking visual reminder of what you are doing at any given moment.
254+
Note that you could change one of those `%F{magenta}...%f` strings to another foreground color for a more striking visual reminder of what you are doing at any given moment.
255+
256+
![AGKOZAK_PROMPT_CHAR demo](img/AGKOZAK_PROMPT_CHAR.gif)
239257

240258
### Custom Git Symbols
241259

260+
If, through the use of another prompt, your muscle memory has been trained to react immediately to a particular set of Git status symbols, or if you have an aesthetic preference for symbols other than the default ASCII ones, you may specify them in the array `AGKOZAK_CUSTOM_SYMBOLS`. The default set is
242261

262+
AGKOZAK_CUSTOM_SYMBOLS=( '&*' '&' '*' '+' 'x' '!' '>' '?' )
243263

244-
### Custom Colors
245-
If you would like to customize the prompt colors, change any of the `AGKOZAK_COLORS_*` variables from their defaults to any valid color and add it to your `.zshrc`. The following are the available color variables and their defaults:
264+
If you prefer the [pure](https://github.com/sindresorhus/pure) symbols for the "diverged," "behind," and "ahead" states, you could use the following settings:
246265

247-
AGKOZAK_COLORS_EXIT_STATUS=red
248-
AGKOZAK_COLORS_USER_HOST=green
249-
AGKOZAK_COLORS_PATH=blue
250-
AGKOZAK_COLORS_BRANCH_STATUS=yellow
251-
AGKOZAK_COLORS_PROMPT_CHAR=white
252-
253-
![Custom colors](img/colors.gif)
266+
AGKOZAK_CUSTOM_SYMBOLS=( '⇣⇡' '⇣' '⇡' '+' 'x' '!' '>' '?' )
254267

255268
### Advanced Customization
256269
If you would like to make further customizations to your prompt, you may use the variables `AGKOZAK_CUSTOM_PROMPT` and `AGKOZAK_CUSTOM_RPROMPT` to specify the exact strings to be used for the left and right prompts. The default prompts, with the default settings, can be expressed as

0 commit comments

Comments
 (0)