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 grub-file and grub-install completions #4119

Merged
merged 2 commits into from Jun 14, 2017

Conversation

Projects
None yet
3 participants
@moverest
Contributor

moverest commented Jun 13, 2017

No description provided.

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Jun 14, 2017

Contributor

I'm not a fan of having options after the description but I don't see any obvious problems with this change. So LGTM. I'll merge in a day or two unless @faho or someone else sees a problem.

Contributor

krader1961 commented Jun 14, 2017

I'm not a fan of having options after the description but I don't see any obvious problems with this change. So LGTM. I'll merge in a day or two unless @faho or someone else sees a problem.

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Jun 14, 2017

Member

I'll merge in a day or two unless @faho or someone else sees a problem.

Nah. In fact I'll go a step further and merge it now.

Member

faho commented Jun 14, 2017

I'll merge in a day or two unless @faho or someone else sees a problem.

Nah. In fact I'll go a step further and merge it now.

@faho faho merged commit be1d32c into fish-shell:master Jun 14, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details

@moverest moverest deleted the moverest:grub-completions branch Jun 14, 2017

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Jun 14, 2017

Member

I'm not a fan of having options after the description

In this particular case, I'm actually a fan:

complete -c grub-install -l target -d 'Install GRUB for given platform' -a 'arm-efi\t arm-uboot\t arm64-efi\t i386-coreboot\t i386-efi\t i386-ieee1275\t i386-multiboot\t i386-pc\t i386-qemu\t i386-xen\t ia64-efi\t mips-arc\t mips-qemu_mips\t mipsel-arc\t mipsel-loongson\t mipsel-qemu_mips\t powerpc-ieee1275\t sparc64-ieee1275\t x86_64-efi\t x86_64-xen\t' -x

However, I mostly like it because of the way it looks when wrapped - github happens to wrap after the description. I'd probably make that explicit by breaking after it:

complete -c grub-install -l target -d 'Install GRUB for given platform' \
-a 'arm-efi\t arm-uboot\t arm64-efi\t i386-coreboot\t i386-efi\t i386-ieee1275\t i386-multiboot\t i386-pc\t i386-qemu\t i386-xen\t ia64-efi\t mips-arc\t mips-qemu_mips\t mipsel-arc\t mipsel-loongson\t mipsel-qemu_mips\t powerpc-ieee1275\t sparc64-ieee1275\t x86_64-efi\t x86_64-xen\t' -x

That looks nice and clean, with both the description and the candidates being visible.

If the description were last, it would be easier to overlook after the big chunk of candidates.

What I don't particularly like is how the "-x" is squeezed in there, almost as if @moverest is ashamed of it, but that's such a minute nit that it's not worth holding the PR for.

Member

faho commented Jun 14, 2017

I'm not a fan of having options after the description

In this particular case, I'm actually a fan:

complete -c grub-install -l target -d 'Install GRUB for given platform' -a 'arm-efi\t arm-uboot\t arm64-efi\t i386-coreboot\t i386-efi\t i386-ieee1275\t i386-multiboot\t i386-pc\t i386-qemu\t i386-xen\t ia64-efi\t mips-arc\t mips-qemu_mips\t mipsel-arc\t mipsel-loongson\t mipsel-qemu_mips\t powerpc-ieee1275\t sparc64-ieee1275\t x86_64-efi\t x86_64-xen\t' -x

However, I mostly like it because of the way it looks when wrapped - github happens to wrap after the description. I'd probably make that explicit by breaking after it:

complete -c grub-install -l target -d 'Install GRUB for given platform' \
-a 'arm-efi\t arm-uboot\t arm64-efi\t i386-coreboot\t i386-efi\t i386-ieee1275\t i386-multiboot\t i386-pc\t i386-qemu\t i386-xen\t ia64-efi\t mips-arc\t mips-qemu_mips\t mipsel-arc\t mipsel-loongson\t mipsel-qemu_mips\t powerpc-ieee1275\t sparc64-ieee1275\t x86_64-efi\t x86_64-xen\t' -x

That looks nice and clean, with both the description and the candidates being visible.

If the description were last, it would be easier to overlook after the big chunk of candidates.

What I don't particularly like is how the "-x" is squeezed in there, almost as if @moverest is ashamed of it, but that's such a minute nit that it's not worth holding the PR for.

@moverest

This comment has been minimized.

Show comment
Hide comment
@moverest

moverest Jun 14, 2017

Contributor

I like the idea of putting the options on a new line.

I find the -x at the end easier to read. At a glance, I can tell which options lack -r, -x or -f when it's at the end of the line. I can read the description and only then tell if the option requires a argument. Whereas, if it's before the description, I have to go back and re-read the line. Plus, it sets it apart from -s. But, if you want it before the description, I'll do that for the next ones. I'm not against one way or the other.

Contributor

moverest commented Jun 14, 2017

I like the idea of putting the options on a new line.

I find the -x at the end easier to read. At a glance, I can tell which options lack -r, -x or -f when it's at the end of the line. I can read the description and only then tell if the option requires a argument. Whereas, if it's before the description, I have to go back and re-read the line. Plus, it sets it apart from -s. But, if you want it before the description, I'll do that for the next ones. I'm not against one way or the other.

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