From de15bf52c0a7a165434901af34c5e2435b126d75 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 18 Dec 2016 23:49:31 +1100 Subject: [PATCH 1/2] General: Revert PATH changes and add /usr/sbin and /sbin to PATH --- neofetch | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index bfd94e62..d3ad0c27 100755 --- a/neofetch +++ b/neofetch @@ -16,9 +16,8 @@ XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}" export LC_ALL=C export LANG=C -# Set PATH to binary directories only -# This solves issues with neofetch opening the pacman game. -export PATH="/usr/sbin:/usr/bin:/sbin:/bin" +# Add /usr/sbin and /sbin to PATH. +export PATH="${PATH}:/usr/sbin:/sbin" # Set no case match. shopt -s nocasematch @@ -376,6 +375,14 @@ get_uptime() { } get_packages() { + # Remove /usr/games from $PATH. + # This solves issues with neofetch opening the + # 'pacman' game. + local PATH=":${PATH}:" + local PATH="${PATH/':/usr/games:'/:}" + local PATH="${PATH%:}" + local PATH="${PATH#:}" + case "$os" in "Linux" | "iPhone OS" | "Solaris") type -p pacman >/dev/null && \ From 23305f0486209d3c3d339a1069f8461cf43341e5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 19 Dec 2016 00:40:55 +1100 Subject: [PATCH 2/2] General: Reorder PATH --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index d3ad0c27..01a750ce 100755 --- a/neofetch +++ b/neofetch @@ -17,7 +17,7 @@ export LC_ALL=C export LANG=C # Add /usr/sbin and /sbin to PATH. -export PATH="${PATH}:/usr/sbin:/sbin" +export PATH="/usr/sbin:/sbin:${PATH}" # Set no case match. shopt -s nocasematch