Skip to content

Commit

Permalink
Merge branch 'main' into add-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh committed Apr 1, 2024
2 parents 855189f + 33b313d commit 0131940
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Add git-prompt-string to your prompt. For example,
PS1='\[\n\e[0;33m\w\e[0m$(git-prompt-string)\n\e[0;32mbash \e[0;36m\$\e[0m \]'
```

![bash](https://github.com/mikesmithgh/git-prompt-string/assets/10135646/0cd23b15-e12b-4ae6-a51e-20d2b38ea7a0)

#### [zsh](https://www.zsh.org/)

```sh
Expand All @@ -93,6 +95,8 @@ setopt PROMPT_SUBST
PROMPT=$'\n%{$fg[yellow]%}%~%{$reset_color%}$(git-prompt-string)\n%{$fg[green]%}zsh %{$fg[cyan]%}%#%{$reset_color%} '
```

![zsh](https://github.com/mikesmithgh/git-prompt-string/assets/10135646/4ec33fa3-6fc9-4c14-8f4a-7d1daeaeaa3e)

#### [fish](https://fishshell.com/)

```fish
Expand All @@ -109,6 +113,8 @@ function fish_prompt
end
```

![fish](https://github.com/mikesmithgh/git-prompt-string/assets/10135646/f4ed0600-e8cd-464f-98bf-5064f00d88d5)

#### [powershell](https://learn.microsoft.com/en-us/powershell/)

```powershell
Expand All @@ -119,6 +125,8 @@ function prompt {
}
```

![pwsh](https://github.com/mikesmithgh/git-prompt-string/assets/10135646/bd712f7a-1ba9-4907-b98a-b8ee35640a50)

#### [nushell](https://www.nushell.sh/)

```nu
Expand All @@ -131,6 +139,8 @@ $env.PROMPT_COMMAND = { ||
$env.PROMPT_COMMAND_RIGHT = ""
```

![nu](https://github.com/mikesmithgh/git-prompt-string/assets/10135646/d75dfeed-cd26-4f87-9475-9288df7247e1)

#### [starship](https://starship.rs/config/)

Starship will hide custom commands that fail with a non-zero exit code. To prevent this, add `|| :`
Expand Down Expand Up @@ -161,6 +171,8 @@ style = "yellow"
use_logical_path = true
```

![starship](https://github.com/mikesmithgh/git-prompt-string/assets/10135646/6a3d1899-7a81-4dbc-82d4-d6b60fc8513f)

### git-prompt-string configuration

#### Nerd Font
Expand Down

0 comments on commit 0131940

Please sign in to comment.