Consistent terminology - use plugin everywhere; #587

This commit is contained in:
Jorge Bucaran 2020-08-13 20:38:02 +09:00
parent e2374589ff
commit 429b99696f
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -1,6 +1,6 @@
set -g fisher_version 3.3.1 set -g fisher_version 3.3.1
function fisher -a cmd -d "fish package manager" function fisher -a cmd -d "fish plugin manager"
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
set -q XDG_DATA_HOME; or set XDG_DATA_HOME ~/.local/share set -q XDG_DATA_HOME; or set XDG_DATA_HOME ~/.local/share
@ -98,9 +98,9 @@ end
function _fisher_complete function _fisher_complete
complete -ec fisher complete -ec fisher
complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages" complete -xc fisher -n __fish_use_subcommand -a add -d "Add plugins"
complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages" complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove plugins"
complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX" complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed plugins matching REGEX"
complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help" complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help"
complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version" complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version"
complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version" complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version"
@ -134,22 +134,21 @@ function _fisher_fmt
end end
function _fisher_help function _fisher_help
echo "usage: fisher add <package...> Add packages" echo "usage: fisher add <plugin...> Add plugin/s"
echo " fisher rm <package...> Remove packages" echo " fisher rm <plugin...> Remove plugin/s"
echo " fisher Update all packages" echo " fisher Update all plugins"
echo " fisher ls [<regex>] List installed packages matching <regex>" echo " fisher ls [<regex>] List installed plugins matching <regex>"
echo " fisher --help Show this help" echo " fisher --help Show this help"
echo " fisher --version Show the current version" echo " fisher --version Show the current version"
echo " fisher self-update Update to the latest version" echo " fisher self-update Update to the latest version"
echo " fisher self-uninstall Uninstall from your system" echo " fisher self-uninstall Uninstall from your system"
echo "examples:" echo "examples:"
echo " fisher add jethrokuan/z rafaelrinaldi/pure" echo " fisher add jorgebucaran/z rafaelrinaldi/pure"
echo " fisher add gitlab.com/foo/bar@v2" echo " fisher add gitlab.com/foo/bar@v2"
echo " fisher add ~/path/to/local/pkg" echo " fisher add ~/path/to/local/pkg"
echo " fisher add <file" echo " fisher add <file"
echo " fisher rm rafaelrinaldi/pure" echo " fisher rm rafaelrinaldi/pure"
echo " fisher ls | fisher rm" echo " fisher ls | fisher rm"
echo " fisher ls fish-\*"
end end
function _fisher_self_update -a file function _fisher_self_update -a file
@ -219,7 +218,7 @@ function _fisher_commit -a cmd
end end
if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs" if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs"
echo "fisher: nothing to commit -- try adding some packages" >&2 echo "fisher: nothing to commit -- try adding some plugins" >&2
return 1 return 1
end end
@ -244,7 +243,7 @@ function _fisher_commit -a cmd
printf((res ? res : "done") " in %.2fs\n", E / 1000) printf((res ? res : "done") " in %.2fs\n", E / 1000)
} }
function fmt(action, n, s) { function fmt(action, n, s) {
return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s return n ? (s ? s ", " : s) action " " n " plugin" (n > 1 ? "s" : "") : s
} }
' >&2 ' >&2
end end
@ -262,7 +261,7 @@ function _fisher_parse -a mode cmd
END { END {
for (k in pkgs) { for (k in pkgs) {
if (CMD != "rm" || MODE == "-W") print pkgs[k] if (CMD != "rm" || MODE == "-W") print pkgs[k]
else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr" else print "fisher: cannot remove \""k"\" -- plugin is not in fishfile" > "/dev/stderr"
} }
} }
function getkey(s, a) { function getkey(s, a) {
@ -317,7 +316,7 @@ function _fisher_fetch
command cp -Rf $fisher_cache/$pkg $fisher_data/$pkg/.. command cp -Rf $fisher_cache/$pkg $fisher_data/$pkg/..
else else
command rm -Rf $fisher_data/$pkg command rm -Rf $fisher_data/$pkg
echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2 echo fisher: cannot add \"$pkg\" -- is this a valid plugin\? >&2
end end
" >/dev/null & " >/dev/null &
set pkg_jobs $pkg_jobs (_fisher_jobs --last) set pkg_jobs $pkg_jobs (_fisher_jobs --last)