diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2018-06-06 15:18:11 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2018-06-06 15:18:11 +0300 |
commit | 49ca38001e313d373e5097cb203c5adca6f9a708 (patch) | |
tree | e67458a73abbbeadc7f6064d32bc47de90257e44 | |
parent | .xsessionrc: add deprecation comment (diff) | |
download | linux-home-49ca38001e313d373e5097cb203c5adca6f9a708.tar.gz linux-home-49ca38001e313d373e5097cb203c5adca6f9a708.zip |
.profile: don't add paths with : in them to PATH
-rw-r--r-- | %HOME%/.profile | 8 | ||||
-rw-r--r-- | %HOME%/.xsessionrc | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/%HOME%/.profile b/%HOME%/.profile index ad04911..6c508b2 100644 --- a/%HOME%/.profile +++ b/%HOME%/.profile @@ -12,6 +12,10 @@ fi path_export() { local path for path; do + # Don't add paths with colons in them: + case "$path" in + *:*) continue ;; + esac case "${PATH-}" in "$path") continue ;; *":$path") continue ;; @@ -55,9 +59,7 @@ python_setup() { command -v "$python" > /dev/null 2>&1 \ && user_base="$( "$python" -m site --user-base )" \ && [ -d "$user_base/bin" ] \ - && path_export "$user_base/bin" \ - && continue - break + && path_export "$user_base/bin" done } diff --git a/%HOME%/.xsessionrc b/%HOME%/.xsessionrc index 1760aee..23d73cc 100644 --- a/%HOME%/.xsessionrc +++ b/%HOME%/.xsessionrc @@ -16,6 +16,6 @@ export_dbus_variables() { } # This is semi-deprecated, since systemd timers can replace cron jobs -# completely, and they works with various DISPLAY/XAUTHORITY/DBUS* variables. +# completely, and they work with various DISPLAY/XAUTHORITY/DBUS* variables. # TODO: remove? export_dbus_variables |