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

Add a method for installing fish function files #1615

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

zachwhaley
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew tests with your changes locally?

Fish shell allows third-party software vendors to put their own function files in a directory for their software.
For brew installed Fish shell, this is /usr/local/share/fish/vendor_functions.d

@@ -778,6 +778,14 @@ def var
HOMEBREW_PREFIX+"var"
end

# The directory where the formula's fish funcion files should be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: function

# installed.
# This is symlinked into `HOMEBREW_PREFIX` after installation or with
# `brew link` for formulae that are not keg-only.
def fish_function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t that be plural like fish_functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change this, but it seemed like the convention was singular.

@zachwhaley
Copy link
Contributor Author

Thanks @bfontaine for the feedback!

Do y'all want me to amend this commit, or create new ones?

@MikeMcQuaid
Copy link
Member

What software installs Fish functions and what are they used for? Thanks!

@zachwhaley
Copy link
Contributor Author

@MikeMcQuaid Fish shell plugins and frameworks probably use Fish functions, (e.g. oh-my-fish), and they are basically command line commands for the Fish shell.

My little project uses a Fish function to override and enhance a command.

Fish shell allows third-party software vendors to put their own function files in a directory for their software.
For brew installed Fish shell, this is /usr/local/share/fish/vendor_functions.d
@MikeMcQuaid
Copy link
Member

My little project uses a Fish function to override and enhance a command.

@zachwhaley To make a core change we'll probably want a few example projects rather than just your personal one. Could you link to a few? Thanks!

@zachwhaley
Copy link
Contributor Author

@MikeMcQuaid see my comment on PR #1616

Thanks!

@zachwhaley
Copy link
Contributor Author

Here are a couple packages that are installing a fish script to some location and asking the user to source that file, when instead they could install that script to fish/vendor_functions.d and it would be autoloaded when the user runs it.

@MikeMcQuaid
Copy link
Member

Perfect, thanks for explaining so well. Merging this and would ❤️ PRs for those formulae to use this after that.

@MikeMcQuaid MikeMcQuaid merged commit 276d009 into Homebrew:master Dec 8, 2016
@zachwhaley zachwhaley deleted the fish_functions branch December 8, 2016 13:45
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants