# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
github.setup scop bash-completion 2.9
maintainers {raimue @raimue}
description Programmable bash completions
Programmable completion library for bash. This port requires bash >=4.1 and \
is meant to be used together with the bash port.
github.tarball_from releases
checksums rmd160 fc664ed3392570ed25150b4e8465fdce4effb243 \
sha256 d48fe378e731062f479c5f8802ffa9d3c40a275a19e6e0f6f6cc4b90fa12b2f5 \
patchfiles patch-vpnc.diff \
patch-fix-quote-readline-by-ref.diff \
patch-remove-pkgutil.diff
reinplace "s:/etc/bash_completion:${prefix}/etc/bash_completion:g" \
${worksrcpath}/bash_completion
reinplace "s:readlink -f:readlink:g" \
${worksrcpath}/bash_completion
# Fix vpnc config location, #29281
reinplace "s:@@PREFIX@@:${prefix}:g" \
${worksrcpath}/completions/vpnc
autoreconf.args --verbose --force --install
xinstall -m 644 -W ${filespath} port launchctl \
${destroot}${prefix}/share/bash-completion/completions/
# Add a link for compatibility with versions <2.0 of this port
ln -s ${prefix}/etc/profile.d/bash_completion.sh ${destroot}${prefix}/etc/bash_completion
To use bash_completion, add the following lines at the end of your .bash_profile:
if \[ -f ${prefix}/etc/profile.d/bash_completion.sh ]; then
. ${prefix}/etc/profile.d/bash_completion.sh
if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx"} {
# Insert an empty line into the notes
The port bash-completion >=2.0 requires bash >=4.1; please make sure
you are using ${prefix}/bin/bash by changing the preferences of your
terminal accordingly. If your version of bash is too old, the script
above will not modify your shell environment and no extended completion