Skip to content

Commit

Permalink
reflect git changes in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
burgesQ committed Nov 11, 2022
1 parent 1df9ead commit 0f4f048
Showing 1 changed file with 73 additions and 15 deletions.
88 changes: 73 additions & 15 deletions docs/sections/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,48 @@

!!! important "This section is rendered asynchronously by default"

The `git` section consists of [`git_branch`](#git-branch-git_branch) and [`git_status`](#git-status-git_status) subsections.
The `git` section consists of [`git_branch`](#git-branch-git_branch), [`git_tag`](#git-tag-git_tag), [`git_status`](#git-status-git_status), [`git_diff`](#git-diff-git_diff), [`git_hash`](#git-hash-git_hash) and
[`git_commit_msg`](#git-commit_msg-git_commit_msg),subsections.

## Options

| Variable | Default | Meaning |
| :--------------------- | :--------------------------------: | ----------------------------------------------------------------------------------------------------------- |
| `SPACESHIP_GIT_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_PREFIX` | `on·` | Section's prefix |
| `SPACESHIP_GIT_SUFFIX` | `$SPACESHIP_PROMPT_DEFAULT_SUFFIX` | Section's suffix |
| `SPACESHIP_GIT_SYMBOL` | `` | Symbol displayed before the section (requires [powerline patched font](https://github.com/powerline/fonts)) |
| `SPACESHIP_GIT_ORDER` | `(git_branch git_status)` | Order of git subsection rendering |
| Variable | Default | Meaning |
|:-----------------------|:------------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------|
| `SPACESHIP_GIT_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_PREFIX` | `on·` | Section's prefix |
| `SPACESHIP_GIT_SUFFIX` | `$SPACESHIP_PROMPT_DEFAULT_SUFFIX` | Section's suffix |
| `SPACESHIP_GIT_SYMBOL` | `` | Symbol displayed before the section (requires [powerline patched font](https://github.com/powerline/fonts)) |
| `SPACESHIP_GIT_ORDER` | `(git_branch git_tag git_status git_diff git_hash git_commit_msg)` | Order of git subsection rendering |
| | | |

## Git branch `git_branch`

The `git_branch` section displays the current branch of the Git repository.

### Options

| Variable | Default | Meaning |
| :---------------------------- | :---------------------: | ----------------------------- |
| `SPACESHIP_GIT_BRANCH_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_BRANCH_ASYNC` | `false` | Render section asynchronously |
| Variable | Default | Meaning |
|:------------------------------|:-----------------------:|-------------------------------|
| `SPACESHIP_GIT_BRANCH_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_BRANCH_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_BRANCH_PREFIX` | `$SPACESHIP_GIT_SYMBOL` | Section's prefix |
| `SPACESHIP_GIT_BRANCH_SUFFIX` | ` ` | Section's suffix |
| `SPACESHIP_GIT_BRANCH_COLOR` | `magenta` | Section's color |
| `SPACESHIP_GIT_BRANCH_SUFFIX` | ` ` | Section's suffix |
| `SPACESHIP_GIT_BRANCH_COLOR` | `magenta` | Section's color |

## Git branch `git_tag`

The `git_tag` section displays the current branch tag of the Git repository.

### Options

| Variable | Default | Meaning |
|:---------------------------|:-------:|-------------------------------|
| `SPACESHIP_GIT_TAG_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_TAG_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_TAG_PREFIX` | ` @` | Section's prefix |
| `SPACESHIP_GIT_TAG_SUFFIX` | ` ` | Section's suffix |
| `SPACESHIP_GIT_TAG_COLOR` | `blue` | Section's color |

## Git status `git_status`

Expand All @@ -52,3 +68,45 @@ The `git_status` subsection displays indicators only when you have a dirty Git r
| `SPACESHIP_GIT_STATUS_AHEAD` | `` | Indicator for unpushed changes (ahead of remote branch) |
| `SPACESHIP_GIT_STATUS_BEHIND` | `` | Indicator for unpulled changes (behind of remote branch) |
| `SPACESHIP_GIT_STATUS_DIVERGED` | `` | Indicator for diverged changes (diverged with remote branch) |

## Git branch `git_diff`

The `git_diff` section displays the count of diff (added and removed) for the current branch with the upstream Git repository.

### Options

| Variable | Default | Meaning |
|:--------------------------------|:-------:|-------------------------------|
| `SPACESHIP_GIT_DIFFSTAT_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_DIFFSTAT_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_DIFFSTAT_PREFIX` | | Section's prefix |
| `SPACESHIP_GIT_DIFFSTAT_SUFFIX` | ` ` | Section's suffix |

## Git branch `git_hash`

The `git_hash` section displays the current branch commit hash of the Git repository.

### Options

| Variable | Default | Meaning |
|:--------------------------------|:---------:|-------------------------------|
| `SPACESHIP_GIT_GIT_HASH_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_GIT_HASH_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_GIT_HASH_PREFIX` | `` | Section's prefix |
| `SPACESHIP_GIT_GIT_HASH_SUFFIX` | ` ` | Section's suffix |
| `SPACESHIP_GIT_GIT_HASH_COLOR` | `magenta` | Section's collor |
| | | |

## Git branch `git_commit_msg`

The `git_commit_msg` section displays the current branch commit message of the Git repository.

### Options

| Variable | Default | Meaning |
|:--------------------------------------|:-------:|-------------------------------|
| `SPACESHIP_GIT_GIT_COMMIT_MSG_SHOW` | `true` | Show section |
| `SPACESHIP_GIT_GIT_COMMIT_MSG_ASYNC` | `true` | Render section asynchronously |
| `SPACESHIP_GIT_GIT_COMMIT_MSG_PREFIX` | ` 📓️ ` | Section's prefix |
| `SPACESHIP_GIT_GIT_COMMIT_MSG_SUFFIX` | ` ` | Section's suffix |
| `SPACESHIP_GIT_GIT_COMMIT_MSG_COLOR` | `black` | Section's collor |

0 comments on commit 0f4f048

Please sign in to comment.