Idea for yum
Peter Backlund
peter.backlund at home.se
Tue Jan 20 11:25:51 UTC 2004
Hi.
I was fooling around with bash-completion, and noticed that the
fedora.us package is already configured to complete yum commands and
even package names. Unfortunately does "yum list" takes _really_ long,
making package name completion unusable. But if you add
/usr/bin/yum -R 120 -e 0 -d 0 -C list | cut -d" " -f1 >
/var/cache/yum/pkg-name-list
to /etc/cron.daily/yum.cron, and then modify /etc/bash_completion like:
install)
COMPREPLY=( $( compgen -W '$( cat /var/cache/yum/pkg-name-list )' --
$cur ) )
in _yum(), you get a daily caching of the package names, and completion
is instant. Very handy.
Also, would it be a good idea to make yum run with -C by default when
"yum update" was run less than X seconds ago, where X is configurable?
That would make sense if the cronjob service is used, since "yum update"
is run once a day.
/Peter Backlund
More information about the fedora-devel-list
mailing list