]> git.phdru.name Git - dotfiles.git/commitdiff
.bashrc: Fix default `PATH`
authorOleg Broytman <phd@phdru.name>
Thu, 9 Nov 2023 10:59:31 +0000 (13:59 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 9 Nov 2023 10:59:31 +0000 (13:59 +0300)
.bashrc

diff --git a/.bashrc b/.bashrc
index 48b9a041f0ea5018f9c89078f86845e0fcd8cae7..f3d2afb1a86bea829e394331b3da921adaa38b01 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -9,7 +9,11 @@
 # Copied from .profile to do minor initialization for non-interactive non-login-shells
 umask 077
 
-PATH="$HOME"/bin:"$HOME"/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+# Fix default PATH
+if [ "$PATH" = "/usr/local/bin:/usr/bin:/bin:/usr/games" ]; then
+    PATH="$HOME"/bin:"$HOME"/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+fi
+
 if [ -n "$DISPLAY" ]; then
     PATH=$PATH:/usr/games
 fi