homeshick: install fish function script with fish_function (#7672)

Instead of installing the homeshick fish function script to `prefix` and asking the user to
source that file in their config, install the function using `fish_function` which installs
the script to the fish shell's function directory, where it will be automatically loaded when
the user runs the script's function.
No additional sourcing required :)
This commit is contained in:
Zach Whaley 2016-12-09 04:09:27 -06:00 committed by Mike McQuaid
parent bcee1b9aee
commit a5dd9558f1

View file

@ -14,7 +14,7 @@ class Homeshick < Formula
inreplace "bin/homeshick", /^homeshick=.*/, "homeshick=#{opt_prefix}"
prefix.install "lib", "homeshick.sh"
prefix.install "homeshick.fish" if build.with? "fish"
fish_function.install "homeshick.fish" if build.with? "fish"
bin.install "bin/homeshick"
bin.install "bin/homeshick.csh" if build.with? "csh"
zsh_completion.install "completions/_homeshick"
@ -32,13 +32,6 @@ class Homeshick < Formula
`source "#{opt_prefix}/homeshick.sh"`
in your $HOME/.bashrc
EOS
if build.with? "fish"
s += <<-EOS.undent
and
`#{opt_prefix}.fish`
in your $HOME/.config/fish/config.fish
EOS
end
if build.with? "csh"
s += <<-EOS.undent
and