From: Oleg Broytman Date: Thu, 9 Nov 2023 10:59:31 +0000 (+0300) Subject: .bashrc: Fix default `PATH` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=64144429292c914963fd99a16c8529b7285416b3;p=dotfiles.git .bashrc: Fix default `PATH` --- diff --git a/.bashrc b/.bashrc index 48b9a04..f3d2afb 100644 --- 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