mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
More compact message report.
This commit is contained in:
parent
30fe72b038
commit
64797388f1
1 changed files with 19 additions and 20 deletions
39
fisher.fish
39
fisher.fish
|
@ -15,7 +15,7 @@ function fisher
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
set -g fisher_version "2.6.14"
|
set -g fisher_version "2.6.15"
|
||||||
set -g fisher_spinners ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏
|
set -g fisher_spinners ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏
|
||||||
|
|
||||||
function __fisher_show_spinner
|
function __fisher_show_spinner
|
||||||
|
@ -177,7 +177,7 @@ function fisher
|
||||||
set items (__fisher_read_bundle_file < "$fisher_file")
|
set items (__fisher_read_bundle_file < "$fisher_file")
|
||||||
|
|
||||||
if test -z "$items"
|
if test -z "$items"
|
||||||
__fisher_log okay "
|
__fisher_log info "
|
||||||
No plugins to install or dependencies missing.
|
No plugins to install or dependencies missing.
|
||||||
" $__fisher_stderr
|
" $__fisher_stderr
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ function fisher
|
||||||
|
|
||||||
__fisher_log info "
|
__fisher_log info "
|
||||||
Please install git and try again.
|
Please install git and try again.
|
||||||
Visit <https://git-scm.com> for more information.
|
Visit <@https://git-scm.com@> for more information.
|
||||||
" $__fisher_stderr
|
" $__fisher_stderr
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
@ -224,7 +224,7 @@ function fisher
|
||||||
switch "$cmd"
|
switch "$cmd"
|
||||||
case install
|
case install
|
||||||
if __fisher_install $items
|
if __fisher_install $items
|
||||||
__fisher_log okay "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
|
__fisher_log info "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
|
||||||
end
|
end
|
||||||
|
|
||||||
case update
|
case update
|
||||||
|
@ -241,7 +241,7 @@ function fisher
|
||||||
|
|
||||||
__fisher_update $items
|
__fisher_update $items
|
||||||
|
|
||||||
__fisher_log okay "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
|
__fisher_log info "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
|
||||||
|
|
||||||
case ls
|
case ls
|
||||||
if test "$argv" -ge 0 -o "$argv" = -
|
if test "$argv" -ge 0 -o "$argv" = -
|
||||||
|
@ -313,7 +313,7 @@ function fisher
|
||||||
|
|
||||||
if test ! -z "$items"
|
if test ! -z "$items"
|
||||||
__fisher_remove $items
|
__fisher_remove $items
|
||||||
__fisher_log okay "Done in @"(
|
__fisher_log info "Done in @"(
|
||||||
__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
|
__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -351,7 +351,7 @@ function __fisher_install
|
||||||
|
|
||||||
if set -l fetched (__fisher_plugin_fetch_items (__fisher_plugin_get_missing $argv))
|
if set -l fetched (__fisher_plugin_fetch_items (__fisher_plugin_get_missing $argv))
|
||||||
if test -z "$fetched"
|
if test -z "$fetched"
|
||||||
__fisher_log okay "
|
__fisher_log info "
|
||||||
No plugins to install or dependencies missing.
|
No plugins to install or dependencies missing.
|
||||||
" $__fisher_stderr
|
" $__fisher_stderr
|
||||||
|
|
||||||
|
@ -551,8 +551,8 @@ function __fisher_plugin_url_clone_async -a url name
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l nc (set_color normal)
|
set -l nc (set_color normal)
|
||||||
set -l error (set_color red)
|
set -l error (set_color $fish_color_error)
|
||||||
set -l okay (set_color green)
|
set -l okay (set_color $fish_color_match)
|
||||||
|
|
||||||
set -l hm_url (printf "%s\n" "$url" | command sed 's|^https://||')
|
set -l hm_url (printf "%s\n" "$url" | command sed 's|^https://||')
|
||||||
|
|
||||||
|
@ -560,10 +560,10 @@ function __fisher_plugin_url_clone_async -a url name
|
||||||
set -lx GIT_ASKPASS /bin/echo
|
set -lx GIT_ASKPASS /bin/echo
|
||||||
|
|
||||||
if command git clone -q --depth 1 '$url' '$fisher_cache/$name' ^ /dev/null
|
if command git clone -q --depth 1 '$url' '$fisher_cache/$name' ^ /dev/null
|
||||||
printf '$okay""OKAY""$nc Fetch $okay%s$nc %s\n' '$name' '$hm_url' > $__fisher_stderr
|
printf '$okay""OK""$nc Fetch $okay%s$nc %s\n' '$name' '$hm_url' > $__fisher_stderr
|
||||||
command cp -Rf '$fisher_cache/$name' '$fisher_config'
|
command cp -Rf '$fisher_cache/$name' '$fisher_config'
|
||||||
else
|
else
|
||||||
printf '$error""ARGH""$nc Fetch $error%s$nc %s\n' '$name' '$hm_url' > $__fisher_stderr
|
printf '$error""ERR""$nc Fetch $error%s$nc %s\n' '$name' '$hm_url' > $__fisher_stderr
|
||||||
end
|
end
|
||||||
" > /dev/stderr &
|
" > /dev/stderr &
|
||||||
|
|
||||||
|
@ -660,16 +660,15 @@ end
|
||||||
|
|
||||||
function __fisher_update_path_async -a name path
|
function __fisher_update_path_async -a name path
|
||||||
set -l nc (set_color normal)
|
set -l nc (set_color normal)
|
||||||
set -l error (set_color red)
|
set -l error (set_color $fish_color_match)
|
||||||
set -l uline (set_color -u)
|
set -l okay (set_color $fish_color_match)
|
||||||
set -l okay (set_color green)
|
|
||||||
|
|
||||||
fish -c "
|
fish -c "
|
||||||
|
|
||||||
pushd $path
|
pushd $path
|
||||||
|
|
||||||
if not command git fetch -q origin master ^ /dev/null
|
if not command git fetch -q origin master ^ /dev/null
|
||||||
printf '$error""ARGH""$nc Fetch $error%s$nc\n' '$name' > $__fisher_stderr
|
printf '$error""ERR""$nc Fetch $error%s$nc\n' '$name' > $__fisher_stderr
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -680,9 +679,9 @@ function __fisher_update_path_async -a name path
|
||||||
command cp -Rf '$path/.' '$fisher_cache/$name'
|
command cp -Rf '$path/.' '$fisher_cache/$name'
|
||||||
|
|
||||||
if test -z \"\$commits\" -o \"\$commits\" -eq 0
|
if test -z \"\$commits\" -o \"\$commits\" -eq 0
|
||||||
printf '$okay""OKAY""$nc Latest $okay%s$nc\n' '$name' > $__fisher_stderr
|
printf '$okay""OK""$nc Latest $okay%s$nc\n' '$name' > $__fisher_stderr
|
||||||
else
|
else
|
||||||
printf '$okay""OKAY""$nc Pulled $okay%s$nc new commit/s $okay%s$nc\n' \$commits '$name' > $__fisher_stderr
|
printf '$okay""OK""$nc Pulled $okay%s$nc new commit/s $okay%s$nc\n' \$commits '$name' > $__fisher_stderr
|
||||||
end
|
end
|
||||||
|
|
||||||
" > /dev/stderr &
|
" > /dev/stderr &
|
||||||
|
@ -1217,15 +1216,15 @@ function __fisher_log -a log message fd
|
||||||
|
|
||||||
printf "%s\n" "$message" | command awk '
|
printf "%s\n" "$message" | command awk '
|
||||||
function okay(s) {
|
function okay(s) {
|
||||||
printf("'$okay'%s'$nc' %s\n", "OKAY", s)
|
printf("'$okay'%s'$nc' %s\n", "OK", s)
|
||||||
}
|
}
|
||||||
|
|
||||||
function info(s) {
|
function info(s) {
|
||||||
printf("'$info'%s'$nc' %s\n", "INFO", s)
|
printf("%s\n", s)
|
||||||
}
|
}
|
||||||
|
|
||||||
function error(s) {
|
function error(s) {
|
||||||
printf("'$error'%s'$nc' %s\n", "ARGH", s)
|
printf("'$error'%s'$nc' %s\n", "ERR", s)
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue