aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/path.bash4
1 files changed, 3 insertions, 1 deletions
diff --git a/bash/bashrc.d/path.bash b/bash/bashrc.d/path.bash
index 961e84cd..9ecf1e9a 100644
--- a/bash/bashrc.d/path.bash
+++ b/bash/bashrc.d/path.bash
@@ -39,7 +39,9 @@ path() {
list|l)
local -a patharr
IFS=: read -a patharr < <(printf '%s\n' "$PATH")
- printf '%s\n' "${patharr[@]}"
+ if ((${#patharr[@]})) ; then
+ printf '%s\n' "${patharr[@]}"
+ fi
;;
# Add a directory to the front of PATH, checking for existence and uniqueness