Skip to content

Commit

Permalink
Correctly set PATH inside and outside of TMUX
Browse files Browse the repository at this point in the history
I noticed my `PATH` had duplicated entries in it. With help from a
GitHub issue[1] and a comment[2] linking to another comment at
StackOverflow[3] I understand the reason behind this duplication and it
also provided me with a solution.

[1]: rbenv/rbenv#369
[2]: rbenv/rbenv#369 (comment)
[3]: https://superuser.com/questions/544989/does-tmux-sort-the-path-variable/583502#583502
  • Loading branch information
dawaa committed Apr 21, 2021
1 parent e4da6f8 commit 4d30d8d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
[[ -s ~/.bashrc ]] && source ~/.bashrc
if [ -f /etc/profile ]; then
PATH=""
source /etc/profile
fi

. ~/.profile
. ~/.bashrc
[[ -s ~/.bash_config ]] && source ~/.bash_config

export PATH="$HOME/.cargo/bin:$PATH"

alias h='cd'
alias g='git'
alias gs='git status'
Expand Down Expand Up @@ -40,5 +48,3 @@ export FZF_DEFAULT_OPTS="--no-mouse --height 50% -1 --reverse --multi --inline-i
export FZF_DEFAULT_COMMAND='rg --files --hidden --glob !.git'

test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

export PATH="$HOME/.cargo/bin:$PATH"

0 comments on commit 4d30d8d

Please sign in to comment.