On Thu, Jun 17, 2010 at 04:11:54PM +0200, David Paleino wrote: > tags 586210 unreproducible > thanks > > Hello, > > On Thu, 17 Jun 2010 12:58:51 +0100, John Hedges wrote: > > > After today's dist-upgrade bash errors on startup. > > The error is caused by /etc/bash-completion.d/system which I believe is no > > longer required. However, the install scripts did not remove the file. > > That file (/etc/bash_completion.d/system, you have a typo there) is not > installed by bash-completion, AFAICT. Moreover, I can't find it in any > official > Debian package, from Lenny onwards. > > Maybe it's something you manually wrote? Or some unofficial package installed > it? > Can you post the output of "dpkg -S completion.d/system"? > > Kindly, > David
Hi David I'ts a really rubbish bug report - I was in too much of a hurry! The problem file is /etc/bash_completion.d/service and it causes a problem on my system when an empty string is passed to: complete -F _service -o default "" I've attached a patch that seems to fix it (rightly or not). Sorry for the garbage! Cheers John
--- /etc/bash_completion.d/service 2010-06-16 18:04:40.000000000 +0100 +++ bash_completion.d/service 2010-06-17 12:21:29.000000000 +0100 @@ -32,9 +32,12 @@ return 0 } && complete -F _service service -[ -d /etc/init.d/ ] && complete -F _service -o default \ - $(for i in /etc/init.d/*; do - complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done) +[ -d /etc/init.d/ ] && ( + services=$(for i in /etc/init.d/*; do + complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done) + if [[ "$services" != "" ]]; then + echo "[$services]" + complete -F _service -o default $services; fi) # Local variables: # mode: shell-script
_______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel