From 494733f948dce387b2ebc6c2683062505f1e68ad Mon Sep 17 00:00:00 2001 From: Joe Green Date: Wed, 13 Dec 2017 10:29:58 +0000 Subject: [PATCH] `fisher up` obeys $fish_path (#407) * Ensure fisherman's completions are placed in the correct fisherman directory when running self update. * Update documentation to include the extra steps required when setting fish_path. * -U instead of -g in README. --- README.md | 9 ++++++++- fisher.fish | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bd2c925..2721028 100644 --- a/README.md +++ b/README.md @@ -139,10 +139,17 @@ The configuration and cache are saved to ~/.config/fisherman and ~/.cache/fisher The fishfile and plugins are saved to ~/.config/fish by default. -To customize this location: +To customize this location, add the following to your ~/.config/fish/config.fish file: ```fish set -U fish_path ~/my/path + +for file in $fish_path/conf.d/*.fish + builtin source $file ^ /dev/null +end + +set fish_function_path $fish_path/functions $fish_function_path +set fish_complete_path $fish_path/completions $fish_complete_path ``` ### What is a fishfile and how do I use it? diff --git a/fisher.fish b/fisher.fish index 0306b49..4544a74 100644 --- a/fisher.fish +++ b/fisher.fish @@ -686,11 +686,11 @@ end function __fisher_self_update set -l file (status --current-filename) - if test "$file" != "$fish_config/functions/$fisher_cmd_name.fish" + if test "$file" != "$fish_path/functions/$fisher_cmd_name.fish" return 1 end - set -l completions "$fish_config/completions/$fisher_cmd_name.fish" + set -l completions "$fish_path/completions/$fisher_cmd_name.fish" set -l raw_url "https://raw.githubusercontent.com/fisherman/fisherman/master/fisher.fish" set -l fake_qs (date "+%s")