You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The agkozak ZSH Prompt is an asynchronous, dynamic color Git prompt for `zsh` that uses basic ASCII symbols to show:
9
9
@@ -16,7 +16,7 @@ The agkozak ZSH Prompt is an asynchronous, dynamic color Git prompt for `zsh` th
16
16
17
17
This prompt has been tested on numerous Linux and BSD distributions, as well as on Solaris 11.3. It also has full asynchronous functionality in Windows environments such as MSYS2, Cygwin, and WSL.
18
18
19
-

19
+

20
20
21
21
## Table of Contents
22
22
@@ -38,17 +38,17 @@ This prompt has been tested on numerous Linux and BSD distributions, as well as
38
38
39
39
The agkozak ZSH prompt requires no framework and can be simply sourced from your `.zshrc` file. Clone the git repo:
And set `ZSH_THEME=agkozak` in your `.zshrc` file.
66
66
67
67
### For [zgen](https://github.com/tarjoilija/zgen) users
68
68
69
69
Add the line
70
70
71
-
zgen load agkozak/agkozak-zsh-theme
71
+
zgen load agkozak/agkozak-zsh-prompt
72
72
73
73
to your `.zshrc` somewhere before the line that says `zgen save`.
74
74
75
75
### For [zplug](https://github.com/zplug/zplug) users
76
76
77
77
Add the line
78
78
79
-
zplug "agkozak/agkozak-zsh-theme"
79
+
zplug "agkozak/agkozak-zsh-prompt"
80
80
81
81
to your `.zshrc` somewhere before the line that says `zplug load`.
82
82
83
83
### For [zplugin](https://github.com/zdharma/zplugin) users
84
84
85
85
Run the command
86
86
87
-
zplugin load agkozak/agkozak-zsh-theme
87
+
zplugin load agkozak/agkozak-zsh-prompt
88
88
89
89
to try out the prompt; add the same command to your `.zshrc` to load it automatically.
90
90
@@ -165,15 +165,15 @@ If you prefer to have a little space between instances of the prompt, put `AGKOZ
165
165
166
166
## Optional Single-Line Prompt
167
167
168
-
Older versions of the agkozak ZSH Prompt provided a single-line prompt. [Because of changes made in ZSH 5.5](https://github.com/agkozak/agkozak-zsh-theme/issues/6) that affect the calculation of cursor position when the prompt wraps, it has become difficult to ensure that in that situation the cursor will land where it is supposed to, i.e. two positions after the `%` or `#` and not on top of the left prompt or after the right prompt. I have made the default prompt two-line, which fixes the problem entirely, but if you prefer a single-line prompt and are willing to put up with the occasional glitch, put
168
+
Older versions of the agkozak ZSH Prompt provided a single-line prompt. [Because of changes made in ZSH 5.5](https://github.com/agkozak/agkozak-zsh-prompt/issues/6) that affect the calculation of cursor position when the prompt wraps, it has become difficult to ensure that in that situation the cursor will land where it is supposed to, i.e. two positions after the `%` or `#` and not on top of the left prompt or after the right prompt. I have made the default prompt two-line, which fixes the problem entirely, but if you prefer a single-line prompt and are willing to put up with the occasional glitch, put
169
169
170
170
AGKOZAK_MULTILINE=0
171
171
172
-
in your `.zshrc` before you source agkozak-zsh-theme.
172
+
in your `.zshrc` before you source agkozak-zsh-prompt.
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:
@@ -208,11 +208,11 @@ The agkozak ZSH Prompt has two different ways of displaying its Git status async
208
208
209
209
The `zsh-async`-based method uses the `zsh/zpty` library to spin off pseudo-terminals that can calculate the Git status without blocking the user from continuing to use the terminal. Unfortunately, `zsh/zpty` does not work well or at all on many systems: Cygwin and MSYS2 are notable examples, but even some installations of BSD or Linux or certain point releases of `zsh` do not support using `zsh/zpty` for the present purpose.
210
210
211
-
The second method is quite similar to the first; it involves creating and disowning child processes that calculate the Git status and then kill themselves off, triggering SIGUSR1 in the process. The `zsh``TRAPUSR1` function then displays the Git status in the right prompt. The problem with this method is that other `zsh` scripts might choose to use `TRAPUSR1`, so the agkozak ZSH Prompt takes the precaution of checking to see if that function has been defined already -- if it has, the theme switches off asynchronous mode entirely. It also routinely checks to see if some other script or the user has redefined `TRAPUSR1` and switches off asynchronous mode out of precaution.
211
+
The second method is quite similar to the first; it involves creating and disowning child processes that calculate the Git status and then kill themselves off, triggering SIGUSR1 in the process. The `zsh``TRAPUSR1` function then displays the Git status in the right prompt. The problem with this method is that other `zsh` scripts might choose to use `TRAPUSR1`, so the agkozak ZSH Prompt takes the precaution of checking to see if that function has been defined already -- if it has, the prompt switches off asynchronous mode entirely. It also routinely checks to see if some other script or the user has redefined `TRAPUSR1` and switches off asynchronous mode out of precaution.
212
212
213
-
If you want to force the agkozak ZSH Prompt to use a specific asynchronous mode (or none at all), execute `export AGKOZAK_FORCE_ASYNC_METHOD=zsh-async`, `usr1`, or `none` before sourcing it. If you want more insight into how the theme is working in your shell, put `export AGKOZAK_THEME_DEBUG=1` in your `.zshrc`.
213
+
If you want to force the agkozak ZSH Prompt to use a specific asynchronous mode (or none at all), execute `export AGKOZAK_FORCE_ASYNC_METHOD=zsh-async`, `usr1`, or `none` before sourcing it. If you want more insight into how the prompt is working in your shell, put `export AGKOZAK_PROMPT_DEBUG=1` in your `.zshrc`.
0 commit comments