This commit is contained in:
committed by
Sindre Sorhus
parent
18c3d66dd5
commit
1d97762b7a
5
pure.zsh
5
pure.zsh
@@ -36,9 +36,10 @@ prompt_pure_git_dirty() {
|
|||||||
# check if we're in a git repo
|
# check if we're in a git repo
|
||||||
command git rev-parse --is-inside-work-tree &>/dev/null || return
|
command git rev-parse --is-inside-work-tree &>/dev/null || return
|
||||||
# check if it's dirty
|
# check if it's dirty
|
||||||
command git diff --quiet --ignore-submodules HEAD &>/dev/null
|
[[ "$PURE_GIT_UNTRACKED_DIRTY" == 0 ]] && local umode="-uno" || local umode="-unormal"
|
||||||
|
command test -n "$(git status --porcelain --ignore-submodules ${umode})"
|
||||||
|
|
||||||
(($? == 1)) && echo '*'
|
(($? == 0)) && echo '*'
|
||||||
}
|
}
|
||||||
|
|
||||||
# displays the exec time of the last command if set threshold was exceeded
|
# displays the exec time of the last command if set threshold was exceeded
|
||||||
|
|||||||
@@ -84,6 +84,10 @@ The max execution time of a process before its run time is shown when it exits.
|
|||||||
|
|
||||||
Set `PURE_GIT_PULL=0` to prevent Pure from checking whether the current Git remote has been updated.
|
Set `PURE_GIT_PULL=0` to prevent Pure from checking whether the current Git remote has been updated.
|
||||||
|
|
||||||
|
### `PURE_GIT_UNTRACKED_DIRTY`
|
||||||
|
|
||||||
|
Set `PURE_GIT_UNTRACKED_DIRTY=0` to not include untracked files in dirtiness check.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
Reference in New Issue
Block a user