ports/63314: fix shells/bash-completion hard coded paths for postfix completion
Toni Viemero
toni.viemero at iki.fi
Sat Mar 6 23:30:13 UTC 2004
The following reply was made to PR ports/63314; it has been noted by GNATS.
From: Toni Viemero <toni.viemero at iki.fi>
To: freebsd-gnats-submit at FreeBSD.org
Cc:
Subject: Re: ports/63314: fix shells/bash-completion hard coded paths for postfix completion
Date: Sun, 7 Mar 2004 01:29:16 +0200
Here's the updated files/patch-aa with hard coded paths removed, since
bash_completion uses $PATH nicely. User needs to have /whatever/sbin
in his/her $PATH, but usually sysadmins do, as the Postfix completions
used by bash-completion are (usually) admin-only.
Also mailq is indeed link to mailwrapper, which uses Postfix mailq when
Postfix is configured as default MTA in /etc/mail/mailer.conf.
--- bash_completion.org Sun Feb 15 05:45:21 2004
+++ bash_completion Sun Mar 7 01:13:59 2004
@@ -31,14 +31,14 @@
if [ -n "${FUNCNAME:-}" ]; then
# we're being sourced from within a function, so we can't use
# 'declare', as this will create local variables within a function
- BASH_COMPLETION=${BASH_COMPLETION:-/etc/bash_completion} 2>/dev/null
- BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/etc/bash_completion.d} \
+ BASH_COMPLETION=${BASH_COMPLETION:-/usr/local/etc/bash_completion} 2>/dev/null
+ BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/usr/local/etc/bash_completion.d} \
2>/dev/null
else
- declare -r BASH_COMPLETION=${BASH_COMPLETION:-/etc/bash_completion} \
+ declare -r BASH_COMPLETION=${BASH_COMPLETION:-/usr/local/etc/bash_completion} \
2>/dev/null
declare -r \
- BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/etc/bash_completion.d} \
+ BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/usr/local/etc/bash_completion.d} \
2>/dev/null
fi
@@ -1050,7 +1050,7 @@
else
len=${#cur}
idx=0
- for pval in $( /usr/sbin/postconf -m ); do
+ for pval in $( postconf -m ); do
if [[ "$cur" == "${pval:0:$len}" ]]; then
COMPREPLY[$idx]="$pval:"
idx=$(($idx+1))
@@ -1126,7 +1126,7 @@
fi
len=${#cur}
idx=0
- for pval in $( /usr/sbin/postconf | cut -d ' ' -f 1 ); do
+ for pval in $( postconf | cut -d ' ' -f 1 ); do
if [[ "$cur" == "${pval:0:$len}" ]]; then
COMPREPLY[$idx]="$pval$eqext"
idx=$(($idx+1))
More information about the freebsd-ports-bugs
mailing list