3 ms·
Does anyone know of a way or how to go about making a way to get <tab> and <tab><tab> to bash autocomplete "systemctl status " with service names? It seems like
by zamadatix 5y ago
Does anyone know of a way or how to go about making a way to get <tab> and <tab><tab> to bash autocomplete "systemctl status " with service names? It seems like remembering where the service name has dashes, matches the package name, has a "d" at the end, and so on is half the battle for me when working with systemctl.
This achieves something similar but it also does a whole lot more than just help complete the name.
Edit: Helps to have bash-completion working properly for the user :).
- deleted 5y ago[deleted]
- isodude 5y agoDoes it suffice with systemd's bash completion? On debian it's bundled with systemd. systemd: /usr/share/bash-completion/completions/systemctl
- xyzzy_plugh 5y agoThis works for me out of the box. Your bash profile might not be sourcing systemd's /usr/share/bash-completion/completions/systemctl or equivalent path. This host has bash 4.4.23 and systemd 247.6
- zamadatix 5y agoThanks for the confirmation I cleaned a few things up and the user profile is now loading it properly and auto-completion works.
- jfrunyon 5y agoHonestly I don't understand why some distros still don't ship with completions for this sort of thing. Debian and Ubuntu have had this for the entire time they've been using systemd, as far as I recall. (And they've supported completion on other tools for even longer!)
- freedomben 5y agowhat distros don't? (honest question)
- jfrunyon 5y agoI'm not sure, to be quite honest. I know I've worked with a few systems in the last ~3.5 years that were missing completions that are present in Ubuntu 18.04, but I can't find any of them now. (It looks like the person I replied to had an issue with his own profile files rather than a distro issue.)
- nicklarsennz 5y agoIt doesn't appear to be on RHEL8 boxes I've been working on recently.