summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-02-09 10:53:43 -0600
committerMatt Strapp <matt@mattstrapp.net>2023-02-09 10:53:43 -0600
commit545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37 (patch)
tree472af65ad159ab447d16c34989fdf52f2408f08f
parentAdd .local/bin to PATH (diff)
downloaddotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.tar
dotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.tar.gz
dotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.tar.bz2
dotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.tar.lz
dotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.tar.xz
dotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.tar.zst
dotfiles-545aefdf5bc0fd95ea5c9b1eff6cfd14c504ad37.zip
PATH shenanigans
-rw-r--r--sh/.config/shell/aliasrc2
-rw-r--r--zsh/.config/zsh/.zshenv7
-rw-r--r--zsh/.config/zsh/.zshrc17
3 files changed, 14 insertions, 12 deletions
diff --git a/sh/.config/shell/aliasrc b/sh/.config/shell/aliasrc
index e05a45f..c5dc9ea 100644
--- a/sh/.config/shell/aliasrc
+++ b/sh/.config/shell/aliasrc
@@ -7,7 +7,7 @@
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
# sudo not required for some system commands
-for x in mount umount sv pacman updatedb su ; do
+for x in mount umount sv emerge apt pacman updatedb su ; do
alias $x="sudo $x"
done
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