Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

simon04
Copy link
Contributor

@simon04 simon04 commented Feb 10, 2019

scripts/zsh.pl Outdated Show resolved Hide resolved
scripts/zsh.pl Outdated Show resolved Hide resolved
FISH_FUNCTIONS_DIR="$withval"
AC_SUBST(FISH_FUNCTIONS_DIR)
;;
esac
Copy link
Member

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}?

Copy link
Contributor Author

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)?

Copy link
Member

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.

Copy link
Member

@bagder bagder left a 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!

@bagder
Copy link
Member

bagder commented Feb 12, 2019

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
Copy link
Member

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') {
Copy link
Member

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.

Copy link
Member

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?

@simon04
Copy link
Contributor Author

simon04 commented Mar 1, 2019 via email

@bagder
Copy link
Member

bagder commented Mar 2, 2019

Thanks!

@bagder bagder closed this in e075b21 Mar 2, 2019
@eli-schwartz
Copy link
Contributor

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants