Guillaume Rousse ([EMAIL PROTECTED]) wrote: > Ainsi parlait Guillaume Rousse : > > Ainsi parlait Han : > > > Guillaume Rousse ([EMAIL PROTECTED]) wrote: > > > > Could the patches proposed here about completion be included > > > > into official mandrake bash package, or "not until they are > > > > accepted by bash developpers" ? > > > > http://www.caliban.org/bash/index.shtml > > > > > > Check the rpm package in my url ;) > > > > Thanks ! > > And here is the urpmi completion for bash :-) > # Mandrake urpmi > # > have urpmi && > _urpmi() > { > COMPREPLY=() > local gcmd > > # if we have a partial word to complete, restrict completions to > # matches of that word > [ -n "$2" ] && gcmd='grep "^$2"' || gcmd=cat > > COMPREPLY=( $( gzip -dc /var/lib/urpmi/synthesis.hdlist.* |\ > awk 'BEGIN {FS="@"} /info/ {print $1}' | sort -u | eval $gcmd ) ) > > } > [ "$have" ] && complete -F _urpmi urpmi
I have been using the completion patches for a while now and sometimes it works nice but lots of times it makes mistakes. For example: cd-ing into a dir with spaces. rpm -ba --clean f[tab] does not find foo.spec man d[tab] shows all manpages with a d but also some nonsence. Ie very nice but not ready for primetime. I agree with Chmouel on this one. Though he is not the man to spend more than one line on this ;) Groetjes, Han. -- http://www.xs4all.nl/~hanb/software
