commit 53530908dc417a1471dc41a05038f25c83e2b0fd
parent 5a8354dd9b52d847cb0edea9a2f63775489b9694
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Fri, 2 Oct 2020 21:26:37 +0200
shell: make path changes work in tmux
Tmux re-sources the env file, resetting the path again. Have to
explicitly clear PATH before calling path_helper.
Former-commit-id: 35ecd071dffff74e9c5da200a236ed3442ba839a
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell/paths b/shell/paths
@@ -1,5 +1,5 @@
#!/bin/sh
-[ -x /usr/libexec/path_helper ] && eval "$(/usr/libexec/path_helper -s)"
+[ -x /usr/libexec/path_helper ] && unset PATH && eval "$(/usr/libexec/path_helper -s)"
[ -d "$HOME/bin" -o -L "$HOME/bin" ] && [ -n "${PATH##*"$HOME/bin"*}" ] && PATH="$HOME/bin:$PATH"
[ -d "$HOME/.local/bin" -o -L "$HOME/.local/bin" ] && [ -n "${PATH##*"$HOME/.local/bin"*}" ] && PATH="$HOME/.local/bin:$PATH"
[ -d "$HOME/.scripts" -o -L "$HOME/.scripts" ] && [ -n "${PATH##*"$HOME/.scripts"*}" ] && PATH="$HOME/.scripts:$PATH"