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

Provide completions for s3cmd #4332

Closed
wants to merge 3 commits into
base: Integration_2.7.0
from

Conversation

Projects
None yet
3 participants
@mqudsi
Contributor

mqudsi commented Aug 15, 2017

No longer auto-generated. Everything has been summarized. Supressing
file completions for initial command, providing list of valid initial
commands, filtering --options by subcommand.

mqudsi added some commits Aug 15, 2017

Provide completions for s3cmd
No longer auto-generated. Everything has been summarized. Supressing
file completions for initial command, providing list of valid initial
commands, filtering --options by subcommand.
Show outdated Hide outdated share/completions/s3cmd.fish Outdated
Show outdated Hide outdated share/completions/s3cmd.fish Outdated
Show outdated Hide outdated share/completions/s3cmd.fish Outdated
@mqudsi

This comment has been minimized.

Show comment
Hide comment
@mqudsi

mqudsi Aug 18, 2017

Contributor

@faho thanks for reviewing; I knew there would be a significant amount of feedback if I opened this a PR rather than merging directly despite the fact that it works.

I had a hard time finding a good reference on the best practices for writing completions and each completion file I looked at was different than the other (though of course I didn't go through too many). Perhaps we can add a more-indepth article about writing completions to the online resources, as the existing seemed to only cover the very basic usage of complete.

I didn't look at the completions for sysctl, I tried to base mine off of apt-get but found it too hard to follow and so ended up reinventing the wheel :)

It doesn't seem like it should be too hard to take these suggestions into account (I'm going to hold off on argparse at this time, if it's OK with you); let me review and push.

Contributor

mqudsi commented Aug 18, 2017

@faho thanks for reviewing; I knew there would be a significant amount of feedback if I opened this a PR rather than merging directly despite the fact that it works.

I had a hard time finding a good reference on the best practices for writing completions and each completion file I looked at was different than the other (though of course I didn't go through too many). Perhaps we can add a more-indepth article about writing completions to the online resources, as the existing seemed to only cover the very basic usage of complete.

I didn't look at the completions for sysctl, I tried to base mine off of apt-get but found it too hard to follow and so ended up reinventing the wheel :)

It doesn't seem like it should be too hard to take these suggestions into account (I'm going to hold off on argparse at this time, if it's OK with you); let me review and push.

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Aug 18, 2017

Member

I had a hard time finding a good reference on the best practices for writing completions and each completion file I looked at was different than the other

Yes, they are. They were written at different times by different people. Obviously I prefer my own style.

Perhaps we can add a more-indepth article about writing completions to the online resources

That would be nice to have, yes.

I didn't look at the completions for sysctl

Note: systemctl, which is basically systemd's main command. sysctl is that thing for tweaking kernel knobs.

The completions for it are nice (except for the use of eval), and easier to follow than the massive git script.

I'm going to hold off on argparse at this time, if it's OK with you

Sure.

let me review and push.

Yes. You can push directly to Integration_2.7.0 if you want - no need to review again, unless you prefer that. In its current state this is okay, my objections are stylistic.

Member

faho commented Aug 18, 2017

I had a hard time finding a good reference on the best practices for writing completions and each completion file I looked at was different than the other

Yes, they are. They were written at different times by different people. Obviously I prefer my own style.

Perhaps we can add a more-indepth article about writing completions to the online resources

That would be nice to have, yes.

I didn't look at the completions for sysctl

Note: systemctl, which is basically systemd's main command. sysctl is that thing for tweaking kernel knobs.

The completions for it are nice (except for the use of eval), and easier to follow than the massive git script.

I'm going to hold off on argparse at this time, if it's OK with you

Sure.

let me review and push.

Yes. You can push directly to Integration_2.7.0 if you want - no need to review again, unless you prefer that. In its current state this is okay, my objections are stylistic.

@mqudsi

This comment has been minimized.

Show comment
Hide comment
@mqudsi

mqudsi Aug 18, 2017

Contributor

OK, thanks again.

Contributor

mqudsi commented Aug 18, 2017

OK, thanks again.

Replace custom s3cmd completion functions with standard __fish_* func…
…tions

Per the discussion with @faho in #4332, replaced some custom completion
state detection functions with standard __fish_* functions used in other
completion sources.

mqudsi added a commit that referenced this pull request Aug 18, 2017

Replace custom s3cmd completion functions with standard __fish_* func…
…tions

Per the discussion with @faho in #4332, replaced some custom completion
state detection functions with standard __fish_* functions used in other
completion sources.

@mqudsi mqudsi closed this Aug 18, 2017

@zanchey zanchey added this to the fish 2.7.0 milestone Aug 19, 2017

krader1961 added a commit that referenced this pull request Aug 19, 2017

Replace custom s3cmd completion functions with standard __fish_* func…
…tions

Per the discussion with @faho in #4332, replaced some custom completion
state detection functions with standard __fish_* functions used in other
completion sources.

(cherry picked from commit f706081)

@mqudsi mqudsi deleted the mqudsi:s3cmd_completions branch Oct 2, 2018

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