Merge pull request #19046 from rycee/bump/bash-completion

Bump bash completion to 2.4
This commit is contained in:
Peter Simons 2016-09-28 18:39:24 +02:00 committed by GitHub
commit 7c7e88b45e
9 changed files with 20 additions and 48 deletions

View File

@ -16,7 +16,7 @@ let
# programmable completion. If we do, enable all modules installed in
# the system (and user profile).
if shopt -q progcomp &>/dev/null; then
. "${pkgs.bashCompletion}/etc/profile.d/bash_completion.sh"
. "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
nullglobStatus=$(shopt -p nullglob)
shopt -s nullglob
for p in $NIX_PROFILES; do

View File

@ -1,22 +0,0 @@
commit a9c556ccad819869a6a5d932aac0a75a99372f08
Author: Barry Warsaw <barry@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.
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

View File

@ -1,28 +1,21 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "bash-completion-2.1";
name = "bash-completion-${version}";
version = "2.4";
src = fetchurl {
url = "http://bash-completion.alioth.debian.org/files/${name}.tar.bz2";
sha256 = "0kxf8s5bw7y50x0ksb77d3kv0dwadixhybl818w27y6mlw26hq1b";
url = "https://github.com/scop/bash-completion/releases/download/${version}/${name}.tar.xz";
sha256 = "1xlhd09sb2w3bw8qaypxgkr0782w082mcbx8zf7yzjgy0996pxy0";
};
patches = [ ./bash-4.3.patch ];
doCheck = true;
# nmcli is included in the network-manager package
postInstall = ''
rm $out/share/bash-completion/completions/nmcli
'';
meta = {
homepage = "http://bash-completion.alioth.debian.org/";
meta = with stdenv.lib; {
homepage = https://github.com/scop/bash-completion;
description = "Programmable completion for the bash shell";
license = "GPL";
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.peti ];
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = [ maintainers.peti ];
};
}

View File

@ -19,7 +19,7 @@
, enableAlternatives ? false
, enableCopyArtifacts ? false
, bashInteractive, bashCompletion
, bashInteractive, bash-completion
}:
assert enableAcoustid -> pythonPackages.pyacoustid != null;
@ -70,7 +70,7 @@ let
allEnabledPlugins = pluginsWithoutDeps ++ enabledOptionalPlugins;
testShell = "${bashInteractive}/bin/bash --norc";
completion = "${bashCompletion}/share/bash-completion/bash_completion";
completion = "${bash-completion}/share/bash-completion/bash_completion";
in pythonPackages.buildPythonApplication rec {
name = "beets-${version}";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, fetchgit, bashCompletion
{ stdenv, fetchzip, fetchgit, bash-completion
, glib, polkit, pkgconfig, intltool, gusb, libusb1, lcms2, sqlite, systemd, dbus
, automake, autoconf, libtool, gtk_doc, which, gobjectIntrospection, argyllcms
, libgudev, sane-backends }:
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
'';
buildInputs = [ glib polkit pkgconfig intltool gusb libusb1 lcms2 sqlite systemd dbus gobjectIntrospection
bashCompletion argyllcms automake autoconf libgudev sane-backends ];
bash-completion argyllcms automake autoconf libgudev sane-backends ];
postInstall = ''
mkdir -p $out/etc/bash_completion.d

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, bzip2, expat, glib, curl, libxml2, python, rpm, openssl, sqlite, file, xz, pcre, bashCompletion }:
{ stdenv, fetchFromGitHub, cmake, pkgconfig, bzip2, expat, glib, curl, libxml2, python, rpm, openssl, sqlite, file, xz, pcre, bash-completion }:
stdenv.mkDerivation rec {
rev = "0.10.0";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
"set (PYTHON_INSTALL_DIR "$out/${python.sitePackages}")"
'';
buildInputs = [ cmake pkgconfig bzip2 expat glib curl libxml2 python rpm openssl sqlite file xz pcre bashCompletion ];
buildInputs = [ cmake pkgconfig bzip2 expat glib curl libxml2 python rpm openssl sqlite file xz pcre bash-completion ];
meta = with stdenv.lib; {
description = "C implementation of createrepo";

View File

@ -3,7 +3,7 @@
, gobjectIntrospection, vala_0_23, gtk_doc, autoreconfHook, autoconf-archive
, nix, boost
, enableCommandNotFound ? false
, enableBashCompletion ? false, bashCompletion ? null }:
, enableBashCompletion ? false, bash-completion ? null }:
stdenv.mkDerivation rec {
name = "packagekit-${version}";
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ glib polkit systemd python gobjectIntrospection vala_0_23 ]
++ lib.optional enableBashCompletion bashCompletion;
++ lib.optional enableBashCompletion bash-completion;
propagatedBuildInputs = [ sqlite nix boost ];
nativeBuildInputs = [ intltool pkgconfig autoreconfHook autoconf-archive gtk_doc ];

View File

@ -24,6 +24,7 @@ doNotDisplayTwice rec {
asciidocFull = asciidoc-full; # added 2014-06-22
bar = lemonbar; # added 2015-01-16
bar-xft = lemonbar-xft; # added 2015-01-16
bashCompletion = bash-completion; # Added 2016-09-28
bridge_utils = bridge-utils; # added 2015-02-20
btrfsProgs = btrfs-progs; # added 2016-01-03
bundler_HEAD = bundler; # added 2015-11-15

View File

@ -4337,7 +4337,7 @@ in
interactive = true;
});
bashCompletion = callPackage ../shells/bash-completion { };
bash-completion = callPackage ../shells/bash-completion { };
dash = callPackage ../shells/dash { };