[Surfraw-devel] [PATCH] Allow completion to work standalone

James Rowe jnrowe at gmail.com
Wed Aug 19 06:40:45 UTC 2009


As reported in Gentoo bug 277891[1] the completion script requires the
bash-completion package to be installed or shopt extglob to be set, this
little patch allows users to manually source the completion file on
systems not using the full bash-completion package.

  1. http://bugs.gentoo.org/show_bug.cgi?id=277891
---
 surfraw-bash-completion.IN |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/surfraw-bash-completion.IN b/surfraw-bash-completion.IN
index ae58e65..866d87f 100644
--- a/surfraw-bash-completion.IN
+++ b/surfraw-bash-completion.IN
@@ -1,4 +1,9 @@
 # -*- sh -*- bash programmable completion for Surfraw, v2.2
+
+# This is for people who wish to use surfraw completion, without
+# installing the bash-completion package which sets this explicitly.
+shopt -s extglob
+
 _surfraw() 
 {       COMPREPLY=()
 	local cur=${COMP_WORDS[COMP_CWORD]}
-- 
1.6.3.3




More information about the Surfraw-devel mailing list