File tree Expand file tree Collapse file tree 7 files changed +16
-14
lines changed Expand file tree Collapse file tree 7 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
10
10
11
11
### Fixed
12
12
- Accidental export of local ` fun ` variable
13
+ - extra "'" in separator for geometry_hg
14
+ - Quoting for zsh 5.0.0 - thanks @psprint
13
15
14
16
## 2.0.2 - 2019-09-04
15
17
Original file line number Diff line number Diff line change @@ -41,12 +41,12 @@ geometry_git_rebase() {
41
41
geometry_git_remote () {
42
42
local unpushed=${GEOMETRY_GIT_SYMBOL_UNPUSHED:- " ⇡" }
43
43
local unpulled=${GEOMETRY_GIT_SYMBOL_UNPULLED:- " ⇣" }
44
- local local_commit && local_commit=$( git rev-parse " @" 2> /dev/null)
45
- local remote_commit && remote_commit=$( git rev-parse " @{u}" 2> /dev/null)
44
+ local local_commit && local_commit=" $( git rev-parse " @" 2> /dev/null) "
45
+ local remote_commit && remote_commit=" $( git rev-parse " @{u}" 2> /dev/null) "
46
46
47
47
[[ $local_commit == " @" || $local_commit == $remote_commit ]] && return
48
48
49
- local common_base && common_base=$( git merge-base " @" " @{u}" 2> /dev/null) # last common commit
49
+ local common_base && common_base=" $( git merge-base " @" " @{u}" 2> /dev/null) " # last common commit
50
50
[[ $common_base == $remote_commit ]] && echo $unpushed && return
51
51
[[ $common_base == $local_commit ]] && echo $unpulled && return
52
52
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ geometry_hg() {
4
4
(( $+ commands[hg] )) || return 1
5
5
[[ -d .hg ]] || return 2
6
6
7
- local branch=" $( ansi ${GEOMETRY_HG_COLOR_BRANCH:= 242} $( hg branch 2> /dev/null) ) "
7
+ local branch=" $( ansi ${GEOMETRY_HG_COLOR_BRANCH:= 242} " $( hg branch 2> /dev/null) " ) "
8
8
9
9
[[ -n " $( hg status 2> /dev/null) " ]] \
10
- && local symbol=$( ansi ${GEOMETRY_HG_COLOR_DIRTY:= red} ${GEOMETRY_HG_SYMBOL_DIRTY:= " ⬡" } ) \
11
- || local symbol=$( ansi ${GEOMETRY_HG_COLOR_CLEAN:= green} ${GEOMETRY_HG_SYMBOL_CLEAN:= " ⬢" } )
10
+ && local symbol=" $( ansi ${GEOMETRY_HG_COLOR_DIRTY:= red} ${GEOMETRY_HG_SYMBOL_DIRTY:= " ⬡" } ) " \
11
+ || local symbol=" $( ansi ${GEOMETRY_HG_COLOR_CLEAN:= green} ${GEOMETRY_HG_SYMBOL_CLEAN:= " ⬢" } ) "
12
12
13
- echo -n " ${branch}${GEOMETRY_HG_SYMBOL_SEPARATOR:= ' :: ' }${symbol} "
13
+ echo -n " ${branch}${GEOMETRY_HG_SYMBOL_SEPARATOR:=:: }${symbol} "
14
14
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ geometry_kube_symbol() {
4
4
}
5
5
6
6
geometry_kube_namespace () {
7
- local kube_namespace=$( kubectl config view --minify --output " jsonpath={..namespace}" 2> /dev/null)
7
+ local kube_namespace=" $( kubectl config view --minify --output " jsonpath={..namespace}" 2> /dev/null) "
8
8
ansi ${GEOMETRY_KUBE_NAMESPACE_COLOR:= default} ${kube_namespace:= default}
9
9
}
10
10
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ geometry_npm_package_version() {
7
7
: ${GEOMETRY_NPM_PACKAGE_VERSION_SYMBOL_COLOR:= red}
8
8
: ${GEOMETRY_NPM_PACKAGE_VERSION_COLOR:= red}
9
9
10
- local npm_package_version=$( \g rep version package.json | \g rep --color=never -oE ' [0-9]+\.[0-9]+\.[0-9]' )
10
+ local npm_package_version=" $( \g rep version package.json | \g rep --color=never -oE ' [0-9]+\.[0-9]+\.[0-9]' ) "
11
11
12
- local symbol=$( ansi $GEOMETRY_NPM_PACKAGE_VERSION_SYMBOL_COLOR $GEOMETRY_NPM_PACKAGE_SYMBOL )
13
- local version=$( ansi $GEOMETRY_NPM_PACKAGE_VERSION_COLOR v$npm_package_version )
12
+ local symbol=" $( ansi $GEOMETRY_NPM_PACKAGE_VERSION_SYMBOL_COLOR $GEOMETRY_NPM_PACKAGE_SYMBOL ) "
13
+ local version=" $( ansi $GEOMETRY_NPM_PACKAGE_VERSION_COLOR v$npm_package_version ) "
14
14
echo -n $symbol $version
15
15
}
Original file line number Diff line number Diff line change 3
3
geometry_rust_version () {
4
4
{ test -f Cargo.toml || ls -1 ' *rs' 2> /dev/null; } || return 1
5
5
6
- local rust_version=$( rustc --version | \g rep --color=never -oE ' [0-9]+\.[0-9]+\.[0-9]' )
6
+ local rust_version=" $( rustc --version | \g rep --color=never -oE ' [0-9]+\.[0-9]+\.[0-9]' ) "
7
7
8
8
ansi ${GEOMETRY_RUST_VERSION_COLOR:= red} v$rust_version
9
9
}
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ geometry_status() {
16
16
colors=(${GEOMETRY_STATUS_SYMBOL_COLOR_HASH_COLORS} )
17
17
fi
18
18
19
- local sum=0; for c in ${(s:: )^HOST} ; do (( sum += $(print - f '% d' "'$c ")) ); done
19
+ local sum=0; for c in ${(s:: )^HOST} ; do (( sum += " $(print - f '% d' "'$c ")" )) ; done
20
20
21
- local index=$(( $sum % ${# colors} ))
21
+ local index=" $(( $sum % ${# colors} )) "
22
22
23
23
[[ " $index " -eq 0 ]] && index=1
24
24
You can’t perform that action at this time.
0 commit comments