Merge branch 'master' into carat-purge

This commit is contained in:
Bjorn Neergaard 2018-05-16 17:10:52 -06:00 committed by GitHub
commit b38273bcf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 7 deletions

View file

@ -152,6 +152,16 @@ set fish_function_path $fish_path/functions $fish_function_path
set fish_complete_path $fish_path/completions $fish_complete_path
```
### How do I have fisherman copy plugin files instead of linking?
By default, fisherman will create symlinks to plugin files.
To have fisherman copy files:
```fish
set -U fisher_copy true
```
### What is a fishfile and how do I use it?
The fishfile lists what you've installed, and it's automatically updated as you install / remove plugins.

View file

@ -54,7 +54,7 @@ function $fisher_cmd_name -d "fish plugin manager"
end
end
set -g fisher_version "2.13.2"
set -g fisher_version "2.13.3"
set -g fisher_spinners ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏
if [ -e /dev/stdout ]
@ -116,6 +116,10 @@ function $fisher_cmd_name -d "fish plugin manager"
set -g fisher_file "$fish_path/fishfile"
end
if test -z "$fisher_copy"
set -g fisher_copy false
end
switch "$argv[1]"
case --complete
__fisher_complete
@ -800,7 +804,11 @@ function __fisher_plugin_enable -a path
command mv -f "$target" "$backup_target" 2> /dev/null
end
command ln -sf "$file" "$target"
if test $fisher_copy = true
command cp -Rf "$file" "$target"
else
command ln -sf "$file" "$target"
end
builtin source "$target" 2> /dev/null
@ -815,19 +823,31 @@ function __fisher_plugin_enable -a path
for file in $path/{functions/,}*.{py,awk}
set -l base (basename "$file")
command ln -sf "$file" "$fish_path/functions/$base"
if test $fisher_copy = true
command cp -Rf "$file" "$fish_path/functions/$base"
else
command ln -sf "$file" "$fish_path/functions/$base"
end
end
for file in $path/conf.d/*.{py,awk}
set -l base (basename "$file")
command ln -sf "$file" "$fish_path/conf.d/$base"
if test $fisher_copy = true
command cp -Rf "$file" "$fish_path/conf.d/$base"
else
command ln -sf "$file" "$fish_path/conf.d/$base"
end
end
for file in $path/conf.d/*.fish
set -l base (basename "$file")
set -l target "$fish_path/conf.d/$base"
command ln -sf "$file" "$target"
if test $fisher_copy = true
command cp -Rf "$file" "$target"
else
command ln -sf "$file" "$target"
end
builtin source "$target" 2> /dev/null
end
@ -835,7 +855,11 @@ function __fisher_plugin_enable -a path
set -l base (basename "$file")
set -l target "$fish_path/completions/$base"
command ln -sf "$file" "$target"
if test $fisher_copy = true
command cp -Rf "$file" "$target"
else
command ln -sf "$file" "$target"
end
builtin source "$target" 2> /dev/null
end
@ -1171,7 +1195,7 @@ function __fisher_remote_index_update
}
if (match($0, /^description:[[:blank:]]*/)) {
description = substr($0, RLENGTH+1)
info = substr($0, RLENGTH+1)
}
if (match($0, /^stargazers_count:[[:blank:]]*/)) {