From 88b688c54413dfc6263bcad7aea119a840606921 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 8 May 2018 22:52:16 +0200 Subject: [PATCH] [hg prompt] Use `hg status -q` For some reason, `hg status -q` prints the exact same output as `hg status`, but about 20% faster. --- share/functions/__fish_hg_prompt.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/functions/__fish_hg_prompt.fish b/share/functions/__fish_hg_prompt.fish index b59cf203b..21f6eaf7a 100644 --- a/share/functions/__fish_hg_prompt.fish +++ b/share/functions/__fish_hg_prompt.fish @@ -52,7 +52,9 @@ function __fish_hg_prompt --description 'Write out the hg prompt' echo -n '|' - set -l repo_status (hg status | string sub -l 2 | sort -u) + # For some reason, "-q" still prints the same output, but ~20% faster. + # Disabling color and pager is always a good idea. + set -l repo_status (hg status -q --color never --pager never | string sub -l 2 | sort -u) # Show nice color for a clean repo if test -z "$repo_status"