[Bash-completion-commits] [bash-completion] 03/04: _init_completion: Handle cword < 0 (LP: #1289597)

Ville Skyttä scop-guest at moszumanska.debian.org
Wed Sep 17 16:41:32 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit a9c556ccad819869a6a5d932aac0a75a99372f08
Author: Barry Warsaw <barry at python.org>
Date:   Wed Sep 17 19:32:43 2014 +0300

    _init_completion: Handle cword < 0 (LP: #1289597)
    
    Previously only bash 4.3 seemed to provoke this, but now with the
    empty command consistency tweak it occurs with earlier as well.
---
 bash_completion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bash_completion b/bash_completion
index 7e01ae4..3bb4bc2 100644
--- a/bash_completion
+++ b/bash_completion
@@ -727,7 +727,7 @@ _init_completion()
         fi
     done
 
-    [[ $cword -eq 0 ]] && return 1
+    [[ $cword -le 0 ]] && return 1
     prev=${words[cword-1]}
 
     [[ ${split-} ]] && _split_longopt && split=true

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list