Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update README headers #49

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,29 @@ go install github.com/mikesmithgh/git-prompt-string@latest

## 🛠️ Setup

### Prompt configuration

Add git-prompt-string to your prompt. For example,

### bash
#### bash
```sh
PROMPT_COMMAND='PS1="\[\n \e[0;33m\w\e[0m$(git-prompt-string)\n \e[0;32m\u@local \e[0;36m\$\e[0m \]"'
```

## Configuration
### git-prompt-string configuration

### Nerd Font
#### Nerd Font

By default, the powerline icon is used as a prefix in the prompt. It is recommended to use a [Nerd Font](https://www.nerdfonts.com/)
to properly display the (nf-pl-branch) icon. See https://www.nerdfonts.com/ to download a Nerd Font. If you
By default, the powerline icon `` is used as a prefix in the prompt. It is recommended to use a [Nerd Font](https://www.nerdfonts.com/)
to properly display the `` (nf-pl-branch) icon. See https://www.nerdfonts.com/ to download a Nerd Font. If you
do not want this symbol, replace the prompt prefix with " ". For example, add the following to you git-prompt-string
configuration.

```toml
prompt_prefix = ' '
```

### Configuration file
#### Configuration file

git-prompt-string will first check if the `--config` option was passed as an argument. If
`--config` is set, the filepath defined in the value will be used as the configuration
Expand Down Expand Up @@ -80,7 +82,7 @@ If the configuration filepath is set to the special value of `NONE`, then all us
be ignored. For example, `git-prompt-string --config=NONE` or `GIT_PROMPT_STRING_CONFIG=NONE git-prompt-string`
will use the default configuration values defined by git-prompt-string.

### Configuration options
#### Configuration options

The following configuration options are available in either as a command-line argument or TOML key.

Expand Down Expand Up @@ -147,7 +149,7 @@ The following configuration options are available in either as a command-line ar
A suffix that is added to the end of the prompt.
```

### Specifying colors
#### Specifying colors

A color value in the configuration must be either a single color or multiple colors
separated by white space.
Expand Down Expand Up @@ -199,7 +201,7 @@ color_untracked="fg:#ff0000 bg:#16f2aa"
color_merging="bg:#ccccff magenta"
```

### Default configuration
#### Default configuration

```toml
prompt_prefix = '  '
Expand Down
Loading