Mercurial > dotfiles
view .chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl @ 876:8589883596fd
fix: remove pathdirs option to avoid slow path completions
see: https://stackoverflow.com/questions/76746392/why-is-my-zsh-tab-completion-slow-on-commands-but-not-directories
> Perform a path search even on command names with slashes in them.
> Thus if ?/usr/local/bin? is in the user?s path, and he or she types ?X11/xinit?, the command ?/usr/local/bin/X11/xinit? will be executed (assuming it exists).
> Commands explicitly beginning with ?/?, ?./? or ?../? are not subject to the path search. This also applies to the ?.? and source builtins.
author | Zeger Van de Vannet <zeger@vandevan.net> |
---|---|
date | Thu, 25 Apr 2024 10:05:40 +0200 |
parents | f3e87577dd3a |
children | 62335df560d9 03de8f9ab845 |
line wrap: on
line source
{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}} {{ $packages := dict "fd" (dict "version" "9.0.0" "url" "https://github.com/sharkdp/fd/releases/download/v${VERSION}/fd-v${VERSION}-i686-unknown-linux-musl.tar.gz") "rg" (dict "version" "14.0.3" "url" "https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/ripgrep-${VERSION}-x86_64-unknown-linux-musl.tar.gz") "delta" (dict "version" "0.16.5" "url" "https://github.com/dandavison/delta/releases/download/${VERSION}/delta-${VERSION}-x86_64-unknown-linux-musl.tar.gz") "hyperfine" (dict "version" "1.18.0" "url" "https://github.com/sharkdp/hyperfine/releases/download/v${VERSION}/hyperfine-v${VERSION}-x86_64-unknown-linux-musl.tar.gz") -}} #!/usr/bin/env bash set -xe DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools INSTALL_DIR=$HOME/bin export MANPAGE_DIR=$HOME/.local/man mkdir -p $MANPAGE_DIR mkdir -p $DOWNLOAD_DIR pushd $DOWNLOAD_DIR {{ range keys $packages | sortAlpha }} {{ $meta := get $packages . -}} VERSION={{ get $meta "version" }} echo "Downloading {{ . }} v{{ get $meta "version" }} ..." curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }} {{ end }} find . -name "*.1" | xargs -I {} sh -c 'install {} "$MANPAGE_DIR/$(basename {})"' popd rm -rf $DOWNLOAD_DIR {{ end }}