Skip to content

Improve systemctl completions - #1950

Closed
faho wants to merge 12 commits into
fish-shell:masterfrom
faho:master
Closed

faho wants to merge 12 commits into
fish-shell:masterfrom
faho:master

Conversation

@faho

@faho faho commented Feb 19, 2015

Copy link
Copy Markdown
Member

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

faho commented Feb 19, 2015

Copy link
Copy Markdown
Member Author

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

zanchey commented Feb 22, 2015

Copy link
Copy Markdown
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.

@faho

faho commented Feb 22, 2015

Copy link
Copy Markdown
Member Author

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 4 commits February 22, 2015 16:21
Was single-quoted, should have been double-quoted
This includes only showing unmasked units in mask, only loaded units in
start and more types in show/list-dependencies
Unfortunately, list-unit-files doesn't understand --state=loaded

This needs a new function to explicitly use list-units

This reverts commit 9f521b7.
@ridiculousfish

Copy link
Copy Markdown
Member

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

@zanchey zanchey added this to the next-minor milestone Mar 11, 2015
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completions for systemctl --user

3 participants