···1616 # programmable completion. If we do, enable all modules installed in
1717 # the system (and user profile).
1818 if shopt -q progcomp &>/dev/null; then
1919- . "${pkgs.bashCompletion}/etc/profile.d/bash_completion.sh"
1919+ . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
2020 nullglobStatus=$(shopt -p nullglob)
2121 shopt -s nullglob
2222 for p in $NIX_PROFILES; do
-22
pkgs/shells/bash-completion/bash-4.3.patch
···11-commit a9c556ccad819869a6a5d932aac0a75a99372f08
22-Author: Barry Warsaw <barry@python.org>
33-Date: Wed Sep 17 19:32:43 2014 +0300
44-55- _init_completion: Handle cword < 0 (LP: #1289597)
66-77- Previously only bash 4.3 seemed to provoke this, but now with the
88- empty command consistency tweak it occurs with earlier as well.
99-1010-diff --git a/bash_completion b/bash_completion
1111-index 7e01ae4..3bb4bc2 100644
1212---- a/bash_completion
1313-+++ b/bash_completion
1414-@@ -727,7 +727,7 @@ _init_completion()
1515- fi
1616- done
1717-1818-- [[ $cword -eq 0 ]] && return 1
1919-+ [[ $cword -le 0 ]] && return 1
2020- prev=${words[cword-1]}
2121-2222- [[ ${split-} ]] && _split_longopt && split=true