Le 25/10/2010 20:50, Ville Skyttä a écrit : > Mandriva has applied a similar patch for some time already, although > their environment variable name was different ($COMP_AVAHI_BROWSE). I'm still interested in merging remaining similar patches (for rpm database completion, and scp remote filesystem completion), and standardising variable names. -- BOFH excuse #164:
root rot
diff -Naur -x '*~' -x '*.orig' -x '*.rej'
bash-completion-20100203/completions/rpm
bash-completion-20100203-rpm-database/completions/rpm
--- bash-completion-20100203/completions/rpm 2010-02-02 19:02:26.000000000
+0100
+++ bash-completion-20100203-rpm-database/completions/rpm 2010-02-03
23:05:49.000000000 +0100
@@ -17,8 +17,10 @@
# SUSE's rpmqpack is faster than rpm -qa
COMPREPLY=( $( compgen -W '$( rpmqpack )' -- "$cur" ) )
else
- _rpm_nodigsig
- COMPREPLY=( $( rpm -qa $nodig $nosig --qf='%{NAME} ' "$cur*" ) )
+ if [ -n "${COMP_RPM_DATABASE:-}" ]; then
+ _rpm_nodigsig
+ COMPREPLY=( $( rpm -qa $nodig $nosig --qf='%{NAME} ' "$cur*" ) )
+ fi
fi
}
diff -Naur -x '*~' -x '*.rej' -x '*.orig'
bash-completion-20100203/completions/ssh
bash-completion-20100203-scp-remote/completions/ssh
--- bash-completion-20100203/completions/ssh 2010-02-02 19:02:26.000000000
+0100
+++ bash-completion-20100203-scp-remote/completions/ssh 2010-02-03
23:01:45.000000000 +0100
@@ -250,6 +250,9 @@
# only. Returns paths escaped with three backslashes.
_scp_remote_files()
{
+ # return if COMP_SCP_REMOTE is not set
+ [ -n "{$COMP_SCP_REMOTE:-}" ] || return 0
+
local IFS=$'\t\n'
# remove backslash escape from the first colon
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Bash-completion-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel
