Bug 83489 - Provide standard alias for all systemd commands
Summary: Provide standard alias for all systemd commands
Status: RESOLVED INVALID
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-04 11:19 UTC by Lukas Zapletal
Modified: 2014-10-09 20:19 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Lukas Zapletal 2014-09-04 11:19:40 UTC
Hello,

it looks like it's not just me who has problems with default commands names. One of the most important binary is called "systemctl", but 'systemc<TAB>' is needed for /usr/bin/systemctl to expand. On the other hand 'servi<TAB>' works just fine and on default Fedora install it's just 'ser<TAB>'. Six (four) keystrokes vs eight.

While aliases solve this problem, I propose to create a git-like wrapper short enough to type with shell completion. Something like:

    sd control
    sd journal
    sd cgls
    sd cgtop

This should give us five to six keystrokes to complete the required command.

If you doubt about having this by default, I propose the same behavior as an optional thing that would ship with systemd and with one command administrators could turn it on.

And where is the benefit when I compare this proposal with user-defined aliases? When you log on a system that is under control of multiple people, you can easily turn this on and save your time. It would be likely turned on by somebody else.

Btw for the "sd" candidate it looks like nothing is using it in Fedora and RHEL. Not sure about other distros tho. This needs more discussion.

[lzap@lzapx ~]$ sudo yum whatprovides /usr/sbin/sd
No matches found

[lzap@lzapx ~]$ sudo yum whatprovides /usr/bin/sd
No matches found
Comment 1 Ryan Sawhill Aroha 2014-09-04 20:35:04 UTC
+1

I teach RHCSA & RHCE curriculum to Red Hat employees that provide technical support for our customers ... and I act as a training resource for existing support techs. Annoyance at typing out the systemctl command is sooooo common that I really think we should do something about it.
Comment 2 Lukas Zapletal 2014-09-05 19:50:10 UTC
I think aliases might be better first step than asking for something in the core distribution. Here is what I put on a paper:

https://github.com/lzap/systemd-shortcuts

It started as a simple systemctl alias and evolved into something like this. Let's see how it works in real life.
Comment 3 Lukas Zapletal 2014-10-09 20:19:37 UTC
Hello,

for the record, here is my prototype:

https://github.com/lzap/systemd-shortcuts

Builds for Fedoras and RHEL6 and 7 are here:

https://copr.fedoraproject.org/coprs/lzap/systemd-shortcuts/


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.