Add sysctl completion #2214

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@faho
Member

faho commented Jul 16, 2015

See fish-shell/fish-shell#1375

I'm not sure about the deprecated/aliased options - if I include them, that makes the output longer for things that do the same, but not including them means people have to read the man page if they've gotten the invocation from somewhere else to find out what they mean.

@faho faho referenced this pull request Jul 16, 2015

Closed

Add sysctl completions #1745

@zanchey

This comment has been minimized.

Show comment
Hide comment
@zanchey

zanchey Jul 17, 2015

Member

This doesn't work on OS X 😞 see #1745 for more.

Member

zanchey commented Jul 17, 2015

This doesn't work on OS X 😞 see #1745 for more.

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho Jul 17, 2015

Member

I just attempted to add support for OSX's weird implementation. The best way I could see was to just try sysctl -h, which OSX sysctl doesn't seem to support, so it should fail and allow us to use a completely different completion (as they are).

It also uses ":" as a key/value separator, so my assumption was that the output of sysctl -a looks like:

flounder:flat

Do note that I DID NOT TEST THIS as I don't have an OSX machine, I purely followed the comments and the manpage.

Member

faho commented Jul 17, 2015

I just attempted to add support for OSX's weird implementation. The best way I could see was to just try sysctl -h, which OSX sysctl doesn't seem to support, so it should fail and allow us to use a completely different completion (as they are).

It also uses ":" as a key/value separator, so my assumption was that the output of sysctl -a looks like:

flounder:flat

Do note that I DID NOT TEST THIS as I don't have an OSX machine, I purely followed the comments and the manpage.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 20, 2015

Member

Looks good on OS X. Thanks for this! Merged as f359ded.

Member

ridiculousfish commented Jul 20, 2015

Looks good on OS X. Thanks for this! Merged as f359ded.

@zanchey zanchey added this to the next-2.x milestone Jul 23, 2015

@faho faho added the release notes label Oct 26, 2015

@faho faho deleted the faho:sysctl-completion branch Dec 16, 2015

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