diff --git a/includes/init.zsh b/includes/init.zsh index 828eef0..12f98c1 100644 --- a/includes/init.zsh +++ b/includes/init.zsh @@ -69,6 +69,7 @@ esac all_paths=( "${HOME}/bin" + "${HOME}/.local/bin" "/usr/local/bin" "/usr/local/sbin" "/usr/bin" @@ -83,6 +84,7 @@ all_paths=( "/mnt/c/Program Files/Kubernetes/Minikube" "/var/lib/snapd/snap/bin" "/opt/homebrew/opt/mysql/bin" + "/Applications/Visual Studio Code.app/Contents/Resources/app/bin" ) for dir in "${all_paths[@]}"; do diff --git a/includes/late_50_tools.zsh b/includes/late_50_tools.zsh index 21fec18..f1a8e9d 100644 --- a/includes/late_50_tools.zsh +++ b/includes/late_50_tools.zsh @@ -160,6 +160,35 @@ else echo "zoxide not found, consider installing it!" fi +# Configure uv (fast Python package manager) +if (( $+commands[uv] )); then + if [[ -z "${UV_CACHE_DIR}" ]]; then + if [[ -n "${XDG_CACHE_HOME}" ]]; then + export UV_CACHE_DIR="${XDG_CACHE_HOME}/uv" + elif (( IS_MACOS )); then + export UV_CACHE_DIR="${HOME}/Library/Caches/uv" + else + export UV_CACHE_DIR="${HOME}/.cache/uv" + fi + fi + + if [[ -z "${UV_PYTHON_INSTALL_DIR}" ]]; then + if [[ -n "${XDG_DATA_HOME}" ]]; then + export UV_PYTHON_INSTALL_DIR="${XDG_DATA_HOME}/uv/python" + elif (( IS_MACOS )); then + export UV_PYTHON_INSTALL_DIR="${HOME}/Library/Application Support/uv/python" + else + export UV_PYTHON_INSTALL_DIR="${HOME}/.local/share/uv/python" + fi + fi + + uv_completion_cache="${ZSH_CACHE_DIR}/uv_completion.zsh" + if is_stale_file "${uv_completion_cache}"; then + uv generate-shell-completion zsh > "${uv_completion_cache}" + fi + source_compiled "${uv_completion_cache}" +fi + # if PHP composer is installed, add it to the path [ -d "${HOME}/.composer/vendor/bin" ] && export PATH="${HOME}/.composer/vendor/bin:${PATH}"