Red Hat Bugzilla – Bug 476450
FutureRequest: add completeon for services
Last modified: 2008-12-16 02:43:53 EST
Sorry, I can't find where fill future request. Please point me, if I should do that not in bugzilla.
I find very useful bash completion for services. Off course we can use /etc/init.d/[TAB] completion for that, but indeed it is not very comfortably.
Small googling, I found this script of completion in archlinux - http://bugs.archlinux.org/task/8481
This is require only one adjustment for Fedora on 3rd line replacement:
May you, please add it in bash-completion package?
Checked this and it appears this functionality is already present. With bash-completion installed at the bash propt:
Presents a list of services available. Is this what you were reffering to?
Yes it is. But it is not worked for me before manual installing mentioned script.
What file refer to it in /usr/share/bash-completion/ ??
Its not in /usr/share/bash-completion/*
Its in /etc/bash_completion
Hm, sure it is present. So, this is my mistake in this case.
But may be it is because bash-completion required relogin to take effect? I install package, and don't find any completion after "service" keyword...
I think will more graceful if in %post script will be done all initialisation, what was made on login from .bashrc or similar scripts? Can we there source appropriate script for current user?
Sourcing it in %post would only affect the shell running the %post script, there's no sane way to push it into shells open elsewhere (and even if there was, I suppose it could be hard to decide which ones should it be pushed to).
As an alternative to relogin, you can source /etc/bash_completion manually after installing in shells where you want it. Closing as notabug based on comment 4, thanks John for helping out.