mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
test -n seems to read the whole string. For performance issues we just analyze the first line by stripping the output of cat to the first line with sed q.
This commit is contained in:
parent
df7f853c8d
commit
bb3fbb793c
1 changed files with 1 additions and 1 deletions
|
|
@ -337,7 +337,7 @@ prompt_vcs() {
|
|||
|
||||
function +vi-git-untracked() {
|
||||
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \
|
||||
-n $(git ls-files --others --exclude-standard) ]]; then
|
||||
-n $(git ls-files --others --exclude-standard | sed q) ]]; then
|
||||
hook_com[unstaged]+=" %F{$VCS_FOREGROUND_COLOR}$VCS_UNTRACKED_ICON%f"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue