FS#8481 - [bash-completion] bash_completion.d/archlinux addition

Attached to Project: Arch Linux
Opened by Alessio Bolognino (mOLOk) - Thursday, 01 November 2007, 23:23 GMT
Last edited by Paul Mattal (paul) - Monday, 04 January 2010, 02:58 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I extended support for operation on services:
now with

$> service [TAB]
915resolution foldingathome lircmd privoxy
acpid gdm mdadm rsyncd
[...]
you get the list of the services, and with

$> service networkmanager [TAB]
restart sleep start stop wake

you get the operation you can do on that service

to make this fully functional there should be a function like:

service() { /etc/rc.d/$1 $2 }
or
service() { /usr/bin/sudo /etc/rc.d/$1 $2 }

defined somewhere, but I'm not sure we want this in "bash_completion".

This task depends upon

Closed by  Paul Mattal (paul)
Monday, 04 January 2010, 02:58 GMT
Reason for closing:  Won't fix
Additional comments about closing:  The dependent  FS#8491  was closed by Aaron as won't fix.
Comment by Aaron Griffin (phrakture) - Friday, 02 November 2007, 16:10 GMT
Adding completion for a non-existent script/function is probably not a good idea. How about this - add a FR for initscripts to add a small "service" script to the mix that does what you outlined above. Assuming enough people like it, and it gets added, we can add this here? Sound good?
Comment by Alessio Bolognino (mOLOk) - Tuesday, 06 November 2007, 15:04 GMT
Done. Look at  FS#8491 .
Comment by Aaron Griffin (phrakture) - Tuesday, 06 November 2007, 17:57 GMT
Ok, in the interim, would it be possible for you to provide completion for "/etc/rc.d/foo <tab>" ? I'm sure there's a way to do that only, which would be a nice compromise.
Comment by Alessio Bolognino (mOLOk) - Tuesday, 06 November 2007, 18:29 GMT
here it is, add:

complete -F _service $(for i in /etc/rc.d/*; do echo $i}; done)

at the end of the archlinux-service file.

Loading...