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
Generate fish completion file #3545
Conversation
FISH_FUNCTIONS_DIR="$withval" | ||
AC_SUBST(FISH_FUNCTIONS_DIR) | ||
;; | ||
esac |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will get unwieldy when the third and fourth and .. and ... shell gets added. Is there a way to support the tab completion with a single configure flag invocation? --with-shell-functions={fish|zsh}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe someone else with a better understanding of the build system (than me) can investigate (later on)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this can be deferred, potentially till when we want to add a third tab completion target even.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
The appveyor fail looks totally unrelated - I just won't retrigger a rebuild now because appveyor seems to be awefully slow at the moment so it'll just add many pointless hours of waiting. |
FISH_FUNCTIONS_DIR="$withval" | ||
AC_SUBST(FISH_FUNCTIONS_DIR) | ||
;; | ||
esac |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this can be deferred, potentially till when we want to add a third tab completion target even.
if ($shell eq 'fish') { | ||
print "# curl fish completion\n\n"; | ||
print qq{$_ \n} foreach (@opts); | ||
} elsif ($shell eq 'zsh') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to lack an else
case erroring out when the shell has been specified to an incorrect value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simon04, any thoughts on this nit?
Sure, makes sense! Done. (Sorry for the late reply; I'm in vacation…)
… |
Thanks! |
For the record... #3723 Fish has a special directory for completions that are installed by thirdparty software and not by fish itself. There is also a pkg-config file to detect that directory. |
This PR adds tab completion for the fish shell.
Reference: https://fishshell.com/docs/current/commands.html#complete
Output: https://gist.github.com/simon04/61f4a944395d32939e8204da376fd4ab