diff --git a/bin/install_tool b/bin/install_tool index 2d55b35..0ef81cc 100755 --- a/bin/install_tool +++ b/bin/install_tool @@ -433,6 +433,14 @@ EOF kubeconform) go install github.com/yannh/kubeconform/cmd/kubeconform@latest ;; + starship) + mkdir -p ${DESTDIR} + download \ + "https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-musl.tar.gz" \ + /tmp/starship.tar.gz + tar -C ${DESTDIR} -zxf /tmp/starship.tar.gz starship + add_bin_symlink starship + ;; *) echo "Unknown tool: ${TOOL}" >/dev/stderr list_tools diff --git a/dotfiles/zshrc.d/functions.zsh b/dotfiles/zshrc.d/functions.zsh index 587d3b2..c440738 100644 --- a/dotfiles/zshrc.d/functions.zsh +++ b/dotfiles/zshrc.d/functions.zsh @@ -1,3 +1,9 @@ function dumpenv { tr '\0' '\n' < /proc/${1}/environ } + +if test -x "${HOME}/tools/starship/starship" ; then + function starship_prompt { + eval $($HOME/tools/starship/starship init zsh) + } +fi