|
79 | 79 |
|
80 | 80 | # Check if the command is an alias - we want to highlight the
|
81 | 81 | # aliased command just like the target command of the alias
|
82 |
| - -fast-run-command "git config --get-regexp 'alias.*'" chroma-git-alias-list "" $(( 10 * 60 )) |
| 82 | + .fast-run-command "git config --get-regexp 'alias.*'" chroma-git-alias-list "" $(( 10 * 60 )) |
83 | 83 | # Grep for line: alias.{user-entered-subcmd}[[:space:]], and remove alias. prefix
|
84 | 84 | __lines_list=( ${${(M)__lines_list[@]:#alias.${__wrd}[[:space:]]##*}#alias.} )
|
85 | 85 |
|
|
95 | 95 | fi
|
96 | 96 | if (( __start_pos >= 0 )); then
|
97 | 97 | # if subcommand exists
|
98 |
| - LANG=C -fast-run-command "git help -a" chroma-git-subcmd-list "" $(( 10 * 60 )) |
| 98 | + LANG=C .fast-run-command "git help -a" chroma-git-subcmd-list "" $(( 10 * 60 )) |
99 | 99 | # (s: :) will split on every space, but because the expression
|
100 | 100 | # isn't double-quoted, the empty elements will be eradicated
|
101 | 101 | # Some further knowledge-base: s-flag is special, it skips
|
@@ -144,10 +144,10 @@ else
|
144 | 144 | if [[ "$__wrd" != -* || "${FAST_HIGHLIGHT[chrome-git-occurred-double-hyphen]}" -eq 1 ]]; then
|
145 | 145 | (( FAST_HIGHLIGHT[chroma-git-counter] += 1, __idx1 = FAST_HIGHLIGHT[chroma-git-counter] ))
|
146 | 146 | if (( __idx1 == 2 )); then
|
147 |
| - -fast-run-git-command "git remote" "chroma-git-remotes" "" |
| 147 | + .fast-run-git-command "git remote" "chroma-git-remotes" "" |
148 | 148 | else
|
149 | 149 | __wrd="${__wrd%%:*}"
|
150 |
| - -fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-branches" "refs/heads" |
| 150 | + .fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-branches" "refs/heads" |
151 | 151 | fi
|
152 | 152 | # if remote/ref exists
|
153 | 153 | if [[ -n ${__lines_list[(r)$__wrd]} ]]; then
|
|
173 | 173 | fi
|
174 | 174 | elif (( ${FAST_HIGHLIGHT[chroma-git-fetch-multiple]} )) \
|
175 | 175 | && [[ "$__wrd" != -* || "${FAST_HIGHLIGHT[chrome-git-occurred-double-hyphen]}" -eq 1 ]]; then
|
176 |
| - -fast-run-git-command "git remote" "chroma-git-remotes" "" |
| 176 | + .fast-run-git-command "git remote" "chroma-git-remotes" "" |
177 | 177 | if [[ -n ${__lines_list[(r)$__wrd]} ]]; then
|
178 | 178 | __style=${FAST_THEME_NAME}correct-subtle
|
179 | 179 | fi
|
@@ -283,12 +283,12 @@ else
|
283 | 283 | __style=${FAST_THEME_NAME}incorrect-subtle
|
284 | 284 | fi
|
285 | 285 | elif [[ "$__idx1" = 3 && "$FAST_HIGHLIGHT[chroma-git-remote-subcommand]" = "add" ]]; then
|
286 |
| - -fast-run-git-command "git remote" "chroma-git-remotes" "" |
| 286 | + .fast-run-git-command "git remote" "chroma-git-remotes" "" |
287 | 287 | if [[ -n ${__lines_list[(r)$__wrd]} ]]; then
|
288 | 288 | __style=${FAST_THEME_NAME}incorrect-subtle
|
289 | 289 | fi
|
290 | 290 | elif [[ "$__idx1" = 3 && -n "$FAST_HIGHLIGHT[chroma-git-remote-subcommand]" ]]; then
|
291 |
| - -fast-run-git-command "git remote" "chroma-git-remotes" "" |
| 291 | + .fast-run-git-command "git remote" "chroma-git-remotes" "" |
292 | 292 | if [[ -n ${__lines_list[(r)$__wrd]} ]]; then
|
293 | 293 | __style=${FAST_THEME_NAME}correct-subtle
|
294 | 294 | else
|
|
305 | 305 | FAST_HIGHLIGHT[chroma-git-branch-change]=1
|
306 | 306 | return 1
|
307 | 307 | elif [[ "$__wrd" != -* ]]; then
|
308 |
| - -fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-branches" "refs/heads" |
| 308 | + .fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-branches" "refs/heads" |
309 | 309 | if [[ -n ${__lines_list[(r)$__wrd]} ]]; then
|
310 | 310 | __style=${FAST_THEME_NAME}correct-subtle
|
311 | 311 | elif (( FAST_HIGHLIGHT[chroma-git-branch-change] )); then
|
|
328 | 328 | if [[ "$__wrd" != -* ]]; then
|
329 | 329 | (( FAST_HIGHLIGHT[chroma-git-counter] += 1, __idx1 = FAST_HIGHLIGHT[chroma-git-counter] ))
|
330 | 330 | if [[ ${FAST_HIGHLIGHT[chroma-git-counter]} -eq 2 ]]; then
|
331 |
| - -fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-branches" "refs/heads" |
332 |
| - -fast-run-git-command "+git tag" "chroma-git-tags" "" |
| 331 | + .fast-run-git-command "git for-each-ref --format='%(refname:short)' refs/heads" "chroma-git-branches" "refs/heads" |
| 332 | + .fast-run-git-command "+git tag" "chroma-git-tags" "" |
333 | 333 | [[ -n ${__lines_list[(r)$__wrd]} ]] && __style=${FAST_THEME_NAME}incorrect-subtle
|
334 | 334 | elif [[ ${FAST_HIGHLIGHT[chroma-git-counter]} -eq 3 ]]; then
|
335 | 335 | fi
|
|
346 | 346 | return 1;
|
347 | 347 | ;;
|
348 | 348 | (3)
|
349 |
| - -fast-run-git-command "git tag" "chroma-git-tags" "" |
| 349 | + .fast-run-git-command "git tag" "chroma-git-tags" "" |
350 | 350 | [[ -n ${__lines_list[(r)$__wrd]} ]] && \
|
351 | 351 | __style=${FAST_THEME_NAME}correct-subtle || \
|
352 | 352 | __style=${FAST_THEME_NAME}incorrect-subtle
|
|
0 commit comments