From patchwork Tue Dec 31 01:45:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: =?utf-8?q?=5Benhancement=2C3=5D_bash=5Fcompletion=3A_be_compatible?= =?utf-8?b?IHdpdGgg4oCcc2V0IC114oCd?= From: Roland Eggner X-Patchwork-Id: 3251 Message-Id: <20131231014531.GN23913@mobil.systemanalysen.net> To: Pierre-Yves David Cc: mercurial-devel@selenic.com Date: Tue, 31 Dec 2013 02:45:31 +0100 # HG changeset patch # Parent aacff37a76a4d952e3154fd5d67837c24767f281 bash_completion: be compatible with “set -u” diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -179,7 +179,7 @@ shopt -s extglob ;; esac - if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then + if [[ -z "${cmd-}" ]] || [ $COMP_CWORD -eq $i ]; then _hg_commands return fi