From 545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Thu, 9 Feb 2023 10:53:43 -0600 Subject: PATH shenanigans --- zsh/.config/zsh/.zshenv | 7 +++---- zsh/.config/zsh/.zshrc | 17 ++++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'zsh') diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index c3f77a6..dfc1dcd 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -4,8 +4,8 @@ # If you don't plan on reverting to bash, you can remove the link in ~/.profile # to clean up. -# Adds `~/.local/bin` to $PATH -export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" +## Adds `~/.local/bin` to $PATH +#export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" export FPATH="$FPATH:${XDG_DATA_HOME:-$HOME/.local/share/zsh/site-functions}" unsetopt PROMPT_SP @@ -45,7 +45,7 @@ export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export VOLTA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/volta" -export PATH="$VOLTA_HOME/bin:$PATH" +export PNPM_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/pnpm" export DENO_INSTALL_ROOT="$HOME/.local/bin" export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison" @@ -58,7 +58,6 @@ export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave/octave_hist" export ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority" export HISTORY_IGNORE="(ls|cd|pwd|exit|sudo reboot|history|cd -|cd ..|clear|fg)" export GDBHISTFILE="$XDG_DATA_HOME"/gdb/history -#export PAGER=nvimpager # Other program settings: export DOTNET_CLI_TELEMETRY_OPTOUT=1 diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 46cf9a7..2bda165 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -58,15 +58,22 @@ _comp_options+=(globdots) # Include hidden files. [[ ! -f ~/.config/zsh/keybindings.zsh ]] || source ~/.config/zsh/keybindings.zsh # zsh parameter completion for the dotnet CLI - _dotnet_zsh_complete() { local completions=("$(dotnet complete "$words")") - reply=( "${(ps:\n:)completions}" ) + # If the completion list is empty, just continue with filename selection + if [ -z "$completions" ] + then + _arguments '*::arguments: _normal' + return + fi + + # This is not a variable assignment, don't remove spaces! + _values = "${(ps:\n:)completions}" } -compctl -K _dotnet_zsh_complete dotnet +compdef _dotnet_zsh_complete dotnet case "$ID" in debian | ubuntu ) @@ -90,7 +97,3 @@ case "$ID" in ;; esac -# pnpm -export PNPM_HOME="/home/user/.local/share/pnpm" -export PATH="$PNPM_HOME:$PATH" -# pnpm end -- cgit v1.2.3