Skip to content

Commit 9cb3509

Browse files
committed
Documentation for colors in pdksh
1 parent 171e6b0 commit 9cb3509

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ The **Polyglot Prompt** is a dynamic prompt for `zsh`, `bash`, `ksh93`, `mksh`,
3232
- [Exit Status](#exit-status)
3333
- [Virtual Environments](#virtual-environments)
3434
- [Kubernetes Integration](#kubernetes-integration)
35+
- [Colors in `pdksh`](#colors-in-pdksh)
3536
- [Enabling `vi` editing mode in `zsh` and `bash`](#enabling-vi-editing-mode-in-zsh-and-bash)
3637

3738
## Basics
@@ -127,6 +128,14 @@ The Polyglot Prompt will display any active virtual environment created with `vi
127128

128129
If you are using the Polyglot Prompt with `bash` or `zsh`, you may add the Kubernetes context and namespace to your prompt with the add-on package [polyglot-kube-ps1](https://github.com/agkozak/polyglot-kube-ps1).
129130

131+
## Colors in `pdksh`
132+
133+
`pdksh` supports the use of color in prompts by allowing the programmer to choose a non-printing character and to use it to delimit color escape sequences. In practice, however, there is no one non-printing character that will work perfectly for all operating systems and terminals. The Polyglot Prompt defaults to `\021` for NetBSD and OpenBSD and to `\016` for everything else. If you want to try using your own non-printing character, you can specify it with the environment variable `POLYGLOT_NP`:
134+
135+
POLYGLOT_NP="\016" # Set this variable to any value you like
136+
137+
If all else fails, you can set `POLYGLOT_PDKSH_COLORS=0` to disable color entirely in `pdksh`.
138+
130139
## Enabling `vi` editing mode in `zsh` and `bash`
131140

132141
The Polyglot Prompt does not enable `vi` editing mode for you. In `zsh`, you may add

0 commit comments

Comments
 (0)