New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve systemctl completions #1950

Closed
wants to merge 12 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@faho
Member

faho commented Feb 19, 2015

This adds support for user-mode and fixes an assumption - in systemctl, options can come before commands.

systemctl --user status works, as does --quiet or --all.

Fixes #1393.

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Feb 19, 2015

Member

Also, does anyone mind if I remove the descriptions from unit completions?

I feel like "alsa-restore.service (Service)" isn't all too helpful. It's just repetition, after all, and removing it can simplify the code quite a bit.

Member

faho commented Feb 19, 2015

Also, does anyone mind if I remove the descriptions from unit completions?

I feel like "alsa-restore.service (Service)" isn't all too helpful. It's just repetition, after all, and removing it can simplify the code quite a bit.

@zanchey

This comment has been minimized.

Show comment
Hide comment
@zanchey

zanchey Feb 22, 2015

Member

Are there times when the type isn't obvious e.g. mounts or sockets? Is the name always printed as alsa-restore.service? If the answers are no and yes respectively then I think that's a good change to make.

Member

zanchey commented Feb 22, 2015

Are there times when the type isn't obvious e.g. mounts or sockets? Is the name always printed as alsa-restore.service? If the answers are no and yes respectively then I think that's a good change to make.

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Feb 22, 2015

Member

I've never seen any case where systemd doesn't print the type - it's also mandatory as part of the filename, and for all arguments except for:

  • ".target" when used with systemctl isolate
  • ".service" with any other operation that takes a unit name

So yeah, it's just duplication.

Member

faho commented Feb 22, 2015

I've never seen any case where systemd doesn't print the type - it's also mandatory as part of the filename, and for all arguments except for:

  • ".target" when used with systemctl isolate
  • ".service" with any other operation that takes a unit name

So yeah, it's just duplication.

faho added some commits Feb 22, 2015

Make enable/disable completions work again
Was single-quoted, should have been double-quoted
Adjust filters a bit
This includes only showing unmasked units in mask, only loaded units in
start and more types in show/list-dependencies
Revert "Adjust filters a bit" - it doesn't work for .service
Unfortunately, list-unit-files doesn't understand --state=loaded

This needs a new function to explicitly use list-units

This reverts commit 9f521b7.
@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Mar 7, 2015

Member

Merged as 5a9b1b1 - sorry for the delay, and thanks!!

Member

ridiculousfish commented Mar 7, 2015

Merged as 5a9b1b1 - sorry for the delay, and thanks!!

@zanchey zanchey added this to the next-minor milestone Mar 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment