diff options
author | 2025-01-17 19:28:01 +0100 | |
---|---|---|
committer | 2025-01-17 19:28:01 +0100 | |
commit | cc3c1f5e9f132716bad18fd8f956bb4ae0517bcb (patch) | |
tree | dfd86ffe306b0c024c0137388560031e472e4331 /zuwu.zsh | |
parent | d08ee7b1f0ae2bbd3491939557032c6117807dae (diff) | |
download | zuwu-cc3c1f5e9f132716bad18fd8f956bb4ae0517bcb.tar.gz zuwu-cc3c1f5e9f132716bad18fd8f956bb4ae0517bcb.tar.bz2 zuwu-cc3c1f5e9f132716bad18fd8f956bb4ae0517bcb.tar.lz zuwu-cc3c1f5e9f132716bad18fd8f956bb4ae0517bcb.zip |
feat: ensure ~/.local/bin is in path in env.zsh aswell
Diffstat (limited to 'zuwu.zsh')
-rwxr-xr-x | zuwu.zsh | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -88,14 +88,11 @@ fi # - noop() {} -# Ensure ~/.local/bin is in the PATH - note that this will "match" if something like `.*$HOME/.local/bin.*`, i don't care -if ! grep "$HOME/.local/bin" <<< "$PATH" >/dev/null 2>/dev/null; then - echo -n 'if ! grep "$HOME/.local/bin" <<< "$PATH" >/dev/null 2>/dev/null; then - export PATH="$PATH:$HOME/.local/bin" -fi -' >> "$HOME/.zshenv" +# Ensure ~/.local/bin is in the PATH +if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then export PATH="$PATH:$HOME/.local/bin" fi + # Ensure ~/.local/bin exists if ! [[ -d "$HOME/.local/bin" ]]; then mkdir "$HOME/.local/bin" || echo "Failed to create '$HOME/.local/bin' for your sanity's sake. For your own sanity, please make this directory." |