diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2016-06-30 20:26:57 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:31:18 +0200 |
commit | d31c50870d0bee042ce660e445c9294a59a3a65b (patch) | |
tree | 6bfc0de3c95267b401b620c2c67859557dc60f97 /extra/source/bash-completion | |
parent | 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff) | |
download | current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz |
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016
Slackware 14.2 x86_64 stable is released!
The long development cycle (the Linux community has lately been living in
"interesting times", as they say) is finally behind us, and we're proud to
announce the release of Slackware 14.2. The new release brings many updates
and modern tools, has switched from udev to eudev (no systemd), and adds
well over a hundred new packages to the system. Thanks to the team, the
upstream developers, the dedicated Slackware community, and everyone else
who pitched in to help make this release a reality.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
Have fun! :-)
Diffstat (limited to 'extra/source/bash-completion')
9 files changed, 209 insertions, 26 deletions
diff --git a/extra/source/bash-completion/bash-completion.SlackBuild b/extra/source/bash-completion/bash-completion.SlackBuild index 7a4634f8..fd7206aa 100755 --- a/extra/source/bash-completion/bash-completion.SlackBuild +++ b/extra/source/bash-completion/bash-completion.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2009, 2010, 2011, 2012, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,9 +22,9 @@ # Slackware build script for bash-completion -VERSION=2.1 +VERSION=2.2 ARCH=noarch -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} CWD=$(pwd) TMP=${TMP:-/tmp} @@ -46,16 +46,32 @@ find . \ # Fixup sh completion for us zcat $CWD/fixup-sh-script-completions.diff.gz | patch -p1 --verbose || exit 1 +# Add some patches from git to fix tar filename completion and related +# https://github.com/scop/bash-completion/issues/15 +zcat $CWD/patches/0001-tar-Don-t-write-to-tmp-jetel.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0002-test-suite-Add-tar-xvf-filename-test-case.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0003-tar-Fix-GNU-tar-help-output-parsing-regex-fixes-15.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0004-tar-Remove-unused-variable.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0005-tar-Detect-GNU-other-from-version-only-once-per-sess.patch.gz | patch -p1 --verbose || exit 1 + +# Don't symlink mpv -> mplayer as it reportedly doesn't work well. Upstream patch. +zcat $CWD/patches/0006-Remove-mplayer-aliased-completion.patch.gz | patch -p1 --verbose || exit 1 + +autoreconf -vif + ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --infodir=/usr/info \ - --docdir=/usr/doc/bash-completion-$VERSION + --docdir=/usr/doc/bash-completion-$VERSION || exit 1 make || exit 1 make install DESTDIR=$PKG || exit 1 +# Create the local directory for admin changes/additions: +mkdir -p $PKG/etc/bash_completion.d/ + chmod 0755 $PKG/etc/profile.d/bash_completion.sh mkdir -p $PKG/usr/doc/bash-completion-$VERSION diff --git a/extra/source/bash-completion/fixup-sh-script-completions.diff b/extra/source/bash-completion/fixup-sh-script-completions.diff index 15bcf1d1..6f3447b8 100644 --- a/extra/source/bash-completion/fixup-sh-script-completions.diff +++ b/extra/source/bash-completion/fixup-sh-script-completions.diff @@ -1,22 +1,19 @@ -The 'sh' completion file only completes on *.sh files. -This breaks the expectation (on Slackware, at least) that -e.g. "sh /etc/rc.d/rc.my<TAB>" will complete to rc.mysql. -This patch fixes that, but a consequence is that "sh" will -complete on *any* filename. IMHO, that's not a regression -at all, since stock bash without bash-completion does that -already... --rworkman +The 'sh' completion file only completes on *.sh files. This breaks the +expectation (on Slackware, at least) that e.g. "sh /etc/rc.d/rc.my<TAB>" +will complete to rc.mysql. This patch fixes that, but a consequence is that +"sh" will complete on *any* filename. IMHO, that's not a regression at all, +since stock bash without bash-completion does that already... --rworkman Acked-by: volkerdi -diff -Nur bash-completion-1.3.orig/completions/sh bash-completion-1.3/completions/sh ---- bash-completion-1.3.orig/completions/sh 2011-01-21 03:36:11.000000000 -0600 -+++ bash-completion-1.3/completions/sh 2011-03-12 02:06:00.964938285 -0600 -@@ -28,7 +28,7 @@ - return 0 - fi - -- _filedir sh -+ _filedir +diff -Nur bash-completion-2.2.orig/completions/sh bash-completion-2.2/completions/sh +--- bash-completion-2.2.orig/completions/sh 2016-02-09 08:52:44.000000000 -0600 ++++ bash-completion-2.2/completions/sh 2016-03-06 00:43:49.744767271 -0600 +@@ -31,6 +31,6 @@ + [[ $args -eq 1 ]] && ext=sh + _filedir $ext } && - complete -F _sh sh +-complete -F _sh sh ++complete -F _sh + # ex: ts=4 sw=4 et filetype=sh diff --git a/extra/source/bash-completion/patches/0001-tar-Don-t-write-to-tmp-jetel.patch b/extra/source/bash-completion/patches/0001-tar-Don-t-write-to-tmp-jetel.patch new file mode 100644 index 00000000..82cbeb0d --- /dev/null +++ b/extra/source/bash-completion/patches/0001-tar-Don-t-write-to-tmp-jetel.patch @@ -0,0 +1,25 @@ +From 6bdd92202f55d7c530dcbeb2a243604dac546cf1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> +Date: Tue, 15 Mar 2016 19:49:55 +0200 +Subject: [PATCH 1/5] tar: Don't write to /tmp/jetel + +--- + completions/tar | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/completions/tar b/completions/tar +index ef18ad6..6e4c74c 100644 +--- a/completions/tar ++++ b/completions/tar +@@ -411,7 +411,7 @@ __tar_try_list_archive() + shift + + read tarball <<<"$(printf -- '%s\n' "$@" \ +- | command sed -n "/^.\{1,\}$regex\$/p" | tee /tmp/jetel)" ++ | command sed -n "/^.\{1,\}$regex\$/p")" + if [[ -n "$tarball" ]]; then + local IFS=$'\n' + COMPREPLY=($(compgen -o filenames -W "$( +-- +2.7.2 + diff --git a/extra/source/bash-completion/patches/0002-test-suite-Add-tar-xvf-filename-test-case.patch b/extra/source/bash-completion/patches/0002-test-suite-Add-tar-xvf-filename-test-case.patch new file mode 100644 index 00000000..8e647374 --- /dev/null +++ b/extra/source/bash-completion/patches/0002-test-suite-Add-tar-xvf-filename-test-case.patch @@ -0,0 +1,27 @@ +From 807f903f86ad647425c83f7ad6fc499014c6734e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> +Date: Tue, 15 Mar 2016 20:19:10 +0200 +Subject: [PATCH 2/5] test suite: Add tar xvf filename test case + +--- + test/lib/completions/tar.exp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/test/lib/completions/tar.exp b/test/lib/completions/tar.exp +index 70e38d0..7cdef94 100644 +--- a/test/lib/completions/tar.exp ++++ b/test/lib/completions/tar.exp +@@ -59,6 +59,10 @@ set test "old option: create and members" + assert_complete_dir "dir/ dir2/ archive.tar.xz escape.tar" "tar cTfvv NOT_EXISTS DONT_CREATE.tar " $::srcdir/fixtures/tar + sync_after_int + ++set test "old option: extract and archive" ++assert_complete_dir "dir/ dir2/ archive.tar.xz escape.tar" "tar xvf " $::srcdir/fixtures/tar ++sync_after_int ++ + if { "$tar_version" == "gnu" } { + set test "check short options" + assert_complete_any "tar -c" +-- +2.7.2 + diff --git a/extra/source/bash-completion/patches/0003-tar-Fix-GNU-tar-help-output-parsing-regex-fixes-15.patch b/extra/source/bash-completion/patches/0003-tar-Fix-GNU-tar-help-output-parsing-regex-fixes-15.patch new file mode 100644 index 00000000..621ccd12 --- /dev/null +++ b/extra/source/bash-completion/patches/0003-tar-Fix-GNU-tar-help-output-parsing-regex-fixes-15.patch @@ -0,0 +1,25 @@ +From 0b7189d4eee4597e11cab02e6b4dcae488db5ca8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> +Date: Wed, 16 Mar 2016 12:28:29 +0200 +Subject: [PATCH 3/5] tar: Fix GNU tar help output parsing regex, fixes #15 + +--- + completions/tar | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/completions/tar b/completions/tar +index 6e4c74c..0a5f588 100644 +--- a/completions/tar ++++ b/completions/tar +@@ -105,7 +105,7 @@ __gnu_tar_parse_help() + # or more options separated by ', ' separator string. We are matching + # like this then: ^<spaces>(<separator>?<option>)+<whatever>$ + if [[ "$line" =~ \ +- ^[[:blank:]]{1,10}(((,[[:blank:]])?(--?([\]\[a-zA-Z0-9?-=]+))(,[[:space:]])?)+).*$ ]]; then ++ ^[[:blank:]]{1,10}(((,[[:blank:]])?(--?([\]\[a-zA-Z0-9?=-]+))(,[[:space:]])?)+).*$ ]]; then + + line=${BASH_REMATCH[1]} + str="${line//,/ }" +-- +2.7.2 + diff --git a/extra/source/bash-completion/patches/0004-tar-Remove-unused-variable.patch b/extra/source/bash-completion/patches/0004-tar-Remove-unused-variable.patch new file mode 100644 index 00000000..767d9bc9 --- /dev/null +++ b/extra/source/bash-completion/patches/0004-tar-Remove-unused-variable.patch @@ -0,0 +1,25 @@ +From 7ab05bf9d97ce5a6ced7acdfc21235e06542c3f2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> +Date: Wed, 16 Mar 2016 12:39:06 +0200 +Subject: [PATCH 4/5] tar: Remove unused variable + +--- + completions/tar | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/completions/tar b/completions/tar +index 0a5f588..9c44dc7 100644 +--- a/completions/tar ++++ b/completions/tar +@@ -696,7 +696,7 @@ _posix_tar() + + _tar() + { +- local cmd=${COMP_WORDS[0]} output line ++ local cmd=${COMP_WORDS[0]} line + read line <<<"$($cmd --version)" + case "$line" in + *GNU*) +-- +2.7.2 + diff --git a/extra/source/bash-completion/patches/0005-tar-Detect-GNU-other-from-version-only-once-per-sess.patch b/extra/source/bash-completion/patches/0005-tar-Detect-GNU-other-from-version-only-once-per-sess.patch new file mode 100644 index 00000000..3e5e06e0 --- /dev/null +++ b/extra/source/bash-completion/patches/0005-tar-Detect-GNU-other-from-version-only-once-per-sess.patch @@ -0,0 +1,46 @@ +From 88c671a2c74bfde3bc2ec7c6f74133ac613c61da Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> +Date: Wed, 16 Mar 2016 12:44:40 +0200 +Subject: [PATCH 5/5] tar: Detect GNU/other from --version only once per + session + +--- + completions/tar | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/completions/tar b/completions/tar +index 9c44dc7..7b3a486 100644 +--- a/completions/tar ++++ b/completions/tar +@@ -696,16 +696,25 @@ _posix_tar() + + _tar() + { +- local cmd=${COMP_WORDS[0]} line ++ local cmd=${COMP_WORDS[0]} func line + read line <<<"$($cmd --version)" + case "$line" in + *GNU*) +- _gtar "$@" ++ func=_gtar + ;; + *) +- _posix_tar "$@" ++ func=_posix_tar + ;; + esac ++ $func "$@" ++ ++ # Install real completion for subsequent completions ++ if [ -n "${COMP_TAR_INTERNAL_PATHS:-}" ]; then ++ complete -F $func -o dirnames tar ++ else ++ complete -F $func tar ++ fi ++ unset -f _tar + } + + +-- +2.7.2 + diff --git a/extra/source/bash-completion/patches/0006-Remove-mplayer-aliased-completion.patch b/extra/source/bash-completion/patches/0006-Remove-mplayer-aliased-completion.patch new file mode 100644 index 00000000..7046f89e --- /dev/null +++ b/extra/source/bash-completion/patches/0006-Remove-mplayer-aliased-completion.patch @@ -0,0 +1,22 @@ +--- ./completions/Makefile.in.orig 2016-03-03 06:12:35.000000000 -0600 ++++ ./completions/Makefile.in 2016-05-31 14:01:42.323415707 -0500 +@@ -1236,7 +1236,7 @@ + rm -f $(targetdir)/$$file && \ + $(LN_S) mcrypt $(targetdir)/$$file ; \ + done +- for file in mplayer2 mencoder gmplayer kplayer mpv ; do \ ++ for file in mplayer2 mencoder gmplayer kplayer ; do \ + rm -f $(targetdir)/$$file && \ + $(LN_S) mplayer $(targetdir)/$$file ; \ + done +--- ./completions/Makefile.am.orig 2016-03-02 13:42:58.000000000 -0600 ++++ ./completions/Makefile.am 2016-05-31 14:01:33.554416246 -0500 +@@ -802,7 +802,7 @@ + rm -f $(targetdir)/$$file && \ + $(LN_S) mcrypt $(targetdir)/$$file ; \ + done +- for file in mplayer2 mencoder gmplayer kplayer mpv ; do \ ++ for file in mplayer2 mencoder gmplayer kplayer ; do \ + rm -f $(targetdir)/$$file && \ + $(LN_S) mplayer $(targetdir)/$$file ; \ + done diff --git a/extra/source/bash-completion/slack-desc b/extra/source/bash-completion/slack-desc index 12687b69..8f9e35b7 100644 --- a/extra/source/bash-completion/slack-desc +++ b/extra/source/bash-completion/slack-desc @@ -9,11 +9,11 @@ bash-completion: bash-completion (programmable completion for the bash shell) bash-completion: bash-completion: Adds programmable completion to the bash shell. A new file called -bash-completion: /etc/bash_completion will be sourced for interactive bash shells -bash-completion: adding all sorts of enhanced command completion features. Once -bash-completion: installed, you may get a list of all commands that have associated -bash-completion: completions with 'complete -p', and examine the code for the shell -bash-completion: functions with 'declare -f'. +bash-completion: /etc/profile.d/bash_completion.sh will be sourced for interactive +bash-completion: bash shells adding all sorts of enhanced command completion features. +bash-completion: Once installed, you may get a list of all commands that have +bash-completion: associated completions with 'complete -p', and examine the code for +bash-completion: the shell functions with 'declare -f'. bash-completion: bash-completion: Homepage: https://alioth.debian.org/projects/bash-completion/ bash-completion: |