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

Add LXC/LXD completions. #3554

Merged
merged 1 commit into from Nov 18, 2016

Conversation

Projects
None yet
2 participants
@haarts
Contributor

haarts commented Nov 15, 2016

Description

This adds (part of) the completions for LXD.
At the moment this covers only the most basic use cases.
Texts are taken from lxc help command.

TODOs:

  • [x ] Changes to fish usage are reflected in user documenation/manpages. not required here
  • [x ] Tests have been added for regressions fixed. not required here
Show outdated Hide outdated share/completions/lxc.fish
Show outdated Hide outdated share/completions/lxc.fish
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments delete --description 'Delete containers or container snapshots.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments exec --description 'Execute the specified command in a container.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments file --description 'Manage files on a container.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments finger --description 'Fingers the LXD instance to check if it is up and working.'

This comment has been minimized.

@faho

faho Nov 15, 2016

Member

"Check if the LXD instance is up"?

@faho

faho Nov 15, 2016

Member

"Check if the LXD instance is up"?

Show outdated Hide outdated share/completions/lxc.fish
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments config --description 'Manage configuration.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments copy --description 'Copy containers within or in between lxd instances.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments delete --description 'Delete containers or container snapshots.'

This comment has been minimized.

@faho

faho Nov 15, 2016

Member

Would just "containers or snapshots" be okay here?

Descriptions should be as short as possible to allow more columns to be used.

@faho

faho Nov 15, 2016

Member

Would just "containers or snapshots" be okay here?

Descriptions should be as short as possible to allow more columns to be used.

This comment has been minimized.

@haarts

haarts Nov 16, 2016

Contributor

I agree with you that that text would be better. However, I took these texts directly from the lxc help <command> output. Leaving it would mean the original output is the One And Only Truth. I kinda like that too.
I'm a little on the fence here.

@haarts

haarts Nov 16, 2016

Contributor

I agree with you that that text would be better. However, I took these texts directly from the lxc help <command> output. Leaving it would mean the original output is the One And Only Truth. I kinda like that too.
I'm a little on the fence here.

Show outdated Hide outdated share/completions/lxc.fish
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments publish --description 'Publish containers as images.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments remote --description 'Manage remote LXD servers.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments restart --description 'Changes state of one or more containers to restart.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments restore --description 'Set the current state of a resource back to a snapshot.'

This comment has been minimized.

@faho

faho Nov 15, 2016

Member

What's "resource" here? Something different from a container? A superset?

@faho

faho Nov 15, 2016

Member

What's "resource" here? Something different from a container? A superset?

Add LXC/LXD completions.
At the moment this covers only the most basic use cases.
Texts are taken from `lxc help` command.
@faho

faho approved these changes Nov 17, 2016

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Nov 17, 2016

Member

@haarts: I'll leave the wording decisions up to you. Let me know when you've decided.

Member

faho commented Nov 17, 2016

@haarts: I'll leave the wording decisions up to you. Let me know when you've decided.

@faho faho added this to the fish 2.5.0 milestone Nov 17, 2016

@haarts

This comment has been minimized.

Show comment
Hide comment
@haarts

haarts Nov 18, 2016

Contributor

@faho I'd like to echo the wording of LXD. But I agree with your suggestion. Lemme try to fix that upstream. In the meanwhile I think we should merge this. When upstream changes I'll create an other PR.

Contributor

haarts commented Nov 18, 2016

@faho I'd like to echo the wording of LXD. But I agree with your suggestion. Lemme try to fix that upstream. In the meanwhile I think we should merge this. When upstream changes I'll create an other PR.

@haarts haarts referenced this pull request Nov 18, 2016

Closed

Wording of help texts #2627

@haarts

This comment has been minimized.

Show comment
Hide comment
@haarts

haarts Nov 18, 2016

Contributor

Upstream issue: lxc/lxd#2627

Contributor

haarts commented Nov 18, 2016

Upstream issue: lxc/lxd#2627

@faho faho merged commit 36d4283 into fish-shell:master Nov 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Nov 18, 2016

Member

Merged, let's see what upstream thinks.

Member

faho commented Nov 18, 2016

Merged, let's see what upstream thinks.

@haarts haarts referenced this pull request Nov 18, 2016

Merged

Update LXD completions. #3564

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