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:
parent
bcee1b9aee
commit
a5dd9558f1
1 changed files with 1 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue