[systemd-devel] How to get used to systemd vs init

Reindl Harald h.reindl at thelounge.net
Tue Jun 23 16:26:05 PDT 2015


Am 24.06.2015 um 01:07 schrieb Chad:
>> You could do something like:
>>
>> systemctl start htt<tab>
>> systemctl st<tab>
>>
>> or else, and it will complete it.
> I use bash. This is a cool trick that systemd has over init.d. I know
> not all programs can do that shell completion, for example
> /etc/init.d/httpd res<tab> does not work (I try it all the time out of
> tab completion habit!)

not true, that's just because you don't use the correct command and call 
a script which is not known to bash-completion directly

[root at honeypot:~]$ service honeypot
restart  start    status   stop
[root at honeypot:~]$ service honeypot ^C
[root at honeypot:~]$ cat /etc/redhat-release
CentOS release 6.6 (Final)

Name        : bash-completion
Arch        : noarch
Epoch       : 1
Version     : 1.3
Release     : 7.el6
Size        : 576 k
Repo        : installed
Summary     : Programmable completion for Bash
URL        : http://bash-completion.alioth.debian.org/
License     : GPLv2+
Beschreibung : bash-completion is a collection of shell functions that 
take advantage
              : of the programmable completion feature of bash.

[root at honeypot:~]$ rpm -q --file /etc/bash_completion.d/service
bash-completion-1.3-7.el6.noarch


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150624/2783d6a7/attachment-0001.sig>


More information about the systemd-devel mailing list