eza ls alternative everywhere
This commit is contained in:
parent
555dc04d21
commit
dc1b0b0761
|
@ -110,20 +110,27 @@
|
|||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}{{- end -}}{{- end -}}{{- end -}}
|
||||
{{- end -}}{{/* if linux */}}
|
||||
|
||||
{{ $myArch = (printf "%s-%s" .sz.os.arch_alt "unknown-linux-gnu" )}}
|
||||
|
||||
{{- with $app_name := "eza" -}}
|
||||
{{- with $cargo_bin_url := (output "sh" "-c" (
|
||||
list
|
||||
"cargo-binstall --log-level debug --dry-run --no-track --no-confirm --json-output"
|
||||
$app_name
|
||||
"| jq \".fields | select ( .message == \\\"Downloading package\\\" )\""
|
||||
| join " ") | fromJson
|
||||
).url
|
||||
-}}
|
||||
{{- with $repo := (printf "%s/%s" "eza-community" $app_name) -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/%s_%s.tar.gz" $repo $version $app_name $myArch)
|
||||
"path" (printf "./%s" $app_name)
|
||||
"url" $cargo_bin_url
|
||||
"path" $app_name
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}{{- end -}}{{- end -}}{{- end -}}
|
||||
{{- end -}}{{/* if linux */}}
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
if is_cmd eza; then
|
||||
|
||||
alias _ls="$(command -v eza) --icons "
|
||||
alias lg="ll --git "
|
||||
alias lg="ll --git --git-repos-no-status"
|
||||
|
||||
[[ -n "${DBG}" ]] && echo "assigned eza as ls alias."
|
||||
|
||||
|
|
Loading…
Reference in New Issue