mirror of
https://github.com/nix-community/home-manager
synced 2024-11-25 06:00:31 +00:00
fish: let plugin read vendor_* dirs which is used in nixpkgs fishPlugins
This commit is contained in:
parent
c0ef0dab55
commit
94908c80b1
2 changed files with 28 additions and 0 deletions
|
@ -523,15 +523,29 @@ in {
|
|||
set -l plugin_dir ${plugin.src}
|
||||
|
||||
# Set paths to import plugin components
|
||||
if test -d $plugin_dir/share/fish/vendor_functions.d
|
||||
set fish_function_path $fish_function_path[1] $plugin_dir/share/fish/vendor_functions.d $fish_function_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/functions
|
||||
set fish_function_path $fish_function_path[1] $plugin_dir/functions $fish_function_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/share/fish/vendor_completions.d
|
||||
set fish_complete_path $fish_complete_path[1] $plugin_dir/share/fish/vendor_completions.d $fish_complete_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/completions
|
||||
set fish_complete_path $fish_complete_path[1] $plugin_dir/completions $fish_complete_path[2..-1]
|
||||
end
|
||||
|
||||
# Source initialization code if it exists.
|
||||
if test -d $plugin_dir/share/fish/vendor_conf.d
|
||||
for f in $plugin_dir/share/fish/vendor_conf.d/*.fish
|
||||
source $f
|
||||
end
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/conf.d
|
||||
for f in $plugin_dir/conf.d/*.fish
|
||||
source $f
|
||||
|
|
|
@ -11,15 +11,29 @@ let
|
|||
set -l plugin_dir ${fooPluginSrc}
|
||||
|
||||
# Set paths to import plugin components
|
||||
if test -d $plugin_dir/share/fish/vendor_functions.d
|
||||
set fish_function_path $fish_function_path[1] $plugin_dir/share/fish/vendor_functions.d $fish_function_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/functions
|
||||
set fish_function_path $fish_function_path[1] $plugin_dir/functions $fish_function_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/share/fish/vendor_completions.d
|
||||
set fish_complete_path $fish_complete_path[1] $plugin_dir/share/fish/vendor_completions.d $fish_complete_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/completions
|
||||
set fish_complete_path $fish_complete_path[1] $plugin_dir/completions $fish_complete_path[2..-1]
|
||||
end
|
||||
|
||||
# Source initialization code if it exists.
|
||||
if test -d $plugin_dir/share/fish/vendor_conf.d
|
||||
for f in $plugin_dir/share/fish/vendor_conf.d/*.fish
|
||||
source $f
|
||||
end
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/conf.d
|
||||
for f in $plugin_dir/conf.d/*.fish
|
||||
source $f
|
||||
|
|
Loading…
Reference in a new issue