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

zachwhaley commented Dec 3, 2016

  • 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

This comment has been minimized.

@bfontaine

bfontaine Dec 3, 2016 Member

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

This comment has been minimized.

@bfontaine

bfontaine Dec 3, 2016 Member

Shouldn’t that be plural like fish_functions?

This comment has been minimized.

@zachwhaley

zachwhaley Dec 3, 2016 Author Contributor

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

@zachwhaley
Copy link
Contributor Author

zachwhaley commented Dec 3, 2016

Thanks @bfontaine for the feedback!

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

@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Dec 4, 2016

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

@zachwhaley
Copy link
Contributor Author

zachwhaley commented Dec 4, 2016

@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
@zachwhaley zachwhaley force-pushed the zachwhaley:fish_functions branch from 0f00d85 to 1995f65 Dec 4, 2016
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Dec 7, 2016

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

zachwhaley commented Dec 8, 2016

@MikeMcQuaid see my comment on PR #1616

Thanks!

@zachwhaley
Copy link
Contributor Author

zachwhaley commented Dec 8, 2016

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

MikeMcQuaid commented Dec 8, 2016

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
3 checks passed
3 checks passed
codecov/patch 72.72% of diff hit (target 63.19%)
Details
codecov/project 63.20% (+<.01%) compared to 88d0e8c
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zachwhaley zachwhaley deleted the zachwhaley:fish_functions branch Dec 8, 2016
@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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.