Mercurial > hg > mercurial-source
changeset 30978:ba22059602e3
bashcompletion: allow skipping completion for 'hg status'
On systems with large repositories and slow disks,
the calls to 'hg status' make autocomplete annoyingly slow.
This fix makes it possible to avoid the slowdown.
author | Mathias De Maré <mathias.de_mare@nokia.com> |
---|---|
date | Mon, 26 Sep 2016 10:47:37 +0200 (2016-09-26) |
parents | 145482f505a5 |
children | a2804ddcf9ae |
files | contrib/bash_completion |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -89,9 +89,11 @@ _hg_status() { - local files="$(_hg_cmd status -n$1 "glob:$cur**")" - local IFS=$'\n' - COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) + if [ -z "$HGCOMPLETE_NOSTATUS" ]; then + local files="$(_hg_cmd status -n$1 "glob:$cur**")" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) + fi } _hg_branches()