Skip to content

Commit

Permalink
feat(custom content): drop
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Jan 17, 2022
1 parent dc2ed66 commit 1056672
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ Name | Type | Description | Default
---|---|---|---
`GIT_PROMPT_KIT_COLOR_ACTION` | string | Color of the Git action segment | `199`
`GIT_PROMPT_KIT_COLOR_ASSUME_UNCHANGED` | string | Color of the Git assumed unchaged files segment | `81`
`GIT_PROMPT_KIT_COLOR_CUSTOM` | string | Color of the custom segment (CWD in the default prompt) | `39`
`GIT_PROMPT_KIT_COLOR_FAILED` | string | Color of the prompt character when the previous command failed | `88`
`GIT_PROMPT_KIT_COLOR_HEAD` | string | Color of the Git HEAD segment when the working tree is dirty | `140`
`GIT_PROMPT_KIT_COLOR_HOST` | string | Color of the host segment | `109`
Expand All @@ -133,7 +132,6 @@ Name | Type | Description | Default

Name | Type | Description | Default
---|---|---|---
`GIT_PROMPT_KIT_CUSTOM_CONTENT` | string | The code for the custom component* | `%2~`**
`GIT_PROMPT_KIT_DEFAULT_PUSH_REMOTE_NAME` | string | The default Git push remote | `upstream`
`GIT_PROMPT_KIT_DEFAULT_REMOTE_NAME` | string | The default Git remote | `origin`
`GIT_PROMPT_KIT_HIDDEN_HOSTS` | array | The hosts that will not be included in the prompt | `()`
Expand All @@ -143,8 +141,6 @@ Name | Type | Description | Default

\* For the special sequences supported in zsh prompts see http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html

\** Current working directory and its parent, with `~` for initial `$HOME` (and with custom zsh "named directories" respected; see http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Shell-state) (use `print -P <string>` to check a prompt string, e.g. `print -P "%2~"`).

### Layout options

"Git ref segment" is HEAD, commits ahead/behind, upstream, and tag.
Expand All @@ -164,7 +160,7 @@ Name | Type | Description | Default
`GIT_PROMPT_KIT_SYMBOL_ASSUME_UNCHANGED` | string | Follows the Git assume-unchanged segment | ``
`GIT_PROMPT_KIT_SYMBOL_BEHIND` | string | Precedes the Git commits-behind segment | `-`
`GIT_PROMPT_KIT_SYMBOL_BRANCH` | string | Precedes the Git branch | none
`GIT_PROMPT_KIT_SYMBOL_CHAR_NORMAL` | string | Character shown at end of prompt for normal users | `%%` ***
`GIT_PROMPT_KIT_SYMBOL_CHAR_NORMAL` | string | Character shown at end of prompt for normal users | `%%` **
`GIT_PROMPT_KIT_SYMBOL_CHAR_ROOT` | string | Character shown at end of prompt for root users | `#`
`GIT_PROMPT_KIT_SYMBOL_COMMIT` | string | Precedes the Git commit | none
`GIT_PROMPT_KIT_SYMBOL_CONFLICTED` | string | Follows the Git conflicted files segment | `UU`
Expand All @@ -181,7 +177,7 @@ Name | Type | Description | Default
`GIT_PROMPT_KIT_SYMBOL_TAG` | string | Precedes the Git tag | `@`
`GIT_PROMPT_KIT_SYMBOL_UNTRACKED` | string | Follows Git untracked file segment | `??`

\*** `%%` expands as `%` in the zsh prompt.
\** `%%` expands as `%` in the zsh prompt.

## Components

Expand Down Expand Up @@ -220,7 +216,6 @@ Name | Type | Description
`GIT_PROMPT_KIT_PUSH_BEHIND` | prompt string | Git: commits behind the push remote
`GIT_PROMPT_KIT_CHAR` | prompt string | Prompt character
`GIT_PROMPT_KIT_CONFLICTED` | prompt string | Git: conflicted files count
`GIT_PROMPT_KIT_CUSTOM` | prompt string | Custom (current working directory by default, see [Content Options](#content-options))
`GIT_PROMPT_KIT_DELETED_STAGED` | prompt string | Git: staged deleted files count
`GIT_PROMPT_KIT_DELETED` | prompt string | Git: unstaged deleted files count
`GIT_PROMPT_KIT_HEAD` | prompt string | Git: HEAD (branch or commit)
Expand Down
8 changes: 0 additions & 8 deletions git-prompt-kit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ typeset -gi GIT_PROMPT_KIT_SHOW_INACTIVE_STATUS=${GIT_PROMPT_KIT_SHOW_INACTIVE_S
# Colors options
GIT_PROMPT_KIT_COLOR_ACTION=${GIT_PROMPT_KIT_COLOR_ACTION-199}
GIT_PROMPT_KIT_COLOR_ASSUME_UNCHANGED=${GIT_PROMPT_KIT_COLOR_ASSUME_UNCHANGED-81}
GIT_PROMPT_KIT_COLOR_CUSTOM=${GIT_PROMPT_KIT_COLOR_CUSTOM-39}
GIT_PROMPT_KIT_COLOR_FAILED=${GIT_PROMPT_KIT_COLOR_FAILED-88}
GIT_PROMPT_KIT_COLOR_HEAD=${GIT_PROMPT_KIT_COLOR_HEAD-140}
GIT_PROMPT_KIT_COLOR_HOST=${GIT_PROMPT_KIT_COLOR_HOST-109}
Expand All @@ -38,7 +37,6 @@ typeset -g GIT_PROMPT_KIT_GITSTATUS_FUNCTIONS_SUFFIX=${GIT_PROMPT_KIT_GITSTATUS_
typeset -g GIT_PROMPT_KIT_GITSTATUSD_INSTANCE_NAME=${GIT_PROMPT_KIT_GITSTATUSD_INSTANCE_NAME:-GIT_PROMPT_KIT}

# Content options
GIT_PROMPT_KIT_CUSTOM_CONTENT=${GIT_PROMPT_KIT_CUSTOM_CONTENT-%2~} # see http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Shell-state
GIT_PROMPT_KIT_DEFAULT_PUSH_REMOTE_NAME=${GIT_PROMPT_KIT_DEFAULT_PUSH_REMOTE_NAME-upstream}
GIT_PROMPT_KIT_DEFAULT_REMOTE_NAME=${GIT_PROMPT_KIT_DEFAULT_REMOTE_NAME-origin}
#
Expand Down Expand Up @@ -82,7 +80,6 @@ typeset -ga _git_prompt_kit_configs
_git_prompt_kit_configs=(
GIT_PROMPT_KIT_COLOR_ACTION
GIT_PROMPT_KIT_COLOR_ASSUME_UNCHANGED
GIT_PROMPT_KIT_COLOR_CUSTOM
GIT_PROMPT_KIT_COLOR_FAILED
GIT_PROMPT_KIT_COLOR_HEAD
GIT_PROMPT_KIT_COLOR_HOST
Expand All @@ -96,7 +93,6 @@ _git_prompt_kit_configs=(
GIT_PROMPT_KIT_COLOR_TAG
GIT_PROMPT_KIT_COLOR_UNSTAGED
GIT_PROMPT_KIT_COLOR_USER
GIT_PROMPT_KIT_CUSTOM_CONTENT
GIT_PROMPT_KIT_DEFAULT_PUSH_REMOTE_NAME
GIT_PROMPT_KIT_DEFAULT_REMOTE_NAME
GIT_PROMPT_KIT_HIDDEN_HOSTS
Expand Down Expand Up @@ -133,7 +129,6 @@ typeset -ga _git_prompt_kit_colors
_git_prompt_kit_colors=(
GIT_PROMPT_KIT_COLOR_ACTION
GIT_PROMPT_KIT_COLOR_ASSUME_UNCHANGED
GIT_PROMPT_KIT_COLOR_CUSTOM
GIT_PROMPT_KIT_COLOR_FAILED
GIT_PROMPT_KIT_COLOR_HEAD
GIT_PROMPT_KIT_COLOR_HOST
Expand Down Expand Up @@ -527,7 +522,6 @@ _git_prompt_kit_update_git() {
_git_prompt_kit_update_nongit() {
emulate -L zsh

typeset -g GIT_PROMPT_KIT_CUSTOM=
typeset -g GIT_PROMPT_KIT_CHAR=
typeset -g GIT_PROMPT_KIT_USERHOST=

Expand All @@ -536,8 +530,6 @@ _git_prompt_kit_update_nongit() {
local -i show_host
local -i show_user

GIT_PROMPT_KIT_CUSTOM="%F{$GIT_PROMPT_KIT_COLOR_CUSTOM}$GIT_PROMPT_KIT_CUSTOM_CONTENT%f"

# Prompt character: % if normal, # if root (has configurable colors for status code of the previous command)
GIT_PROMPT_KIT_CHAR="%F{%(?.$GIT_PROMPT_KIT_COLOR_SUCCEEDED.$GIT_PROMPT_KIT_COLOR_FAILED)}%(!.$GIT_PROMPT_KIT_SYMBOL_CHAR_ROOT.$GIT_PROMPT_KIT_SYMBOL_CHAR_NORMAL)%f"

Expand Down
Binary file modified git-prompt-kit.zsh.zwc
Binary file not shown.

0 comments on commit 1056672

Please sign in to comment.