From 9012696fea9c4529caf6e4da0fea07886884a550 Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Wed, 10 Jul 2024 12:09:31 +0300 Subject: [PATCH] zsh: bit better PATH --- .config/zsh/env.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/zsh/env.zsh b/.config/zsh/env.zsh index 997586a..8af8b35 100644 --- a/.config/zsh/env.zsh +++ b/.config/zsh/env.zsh @@ -1,7 +1,7 @@ #!/bin/zsh ## sort-n-fill PATH -function { +z-sort-path() { local -a p local -aU t npath games @@ -31,7 +31,10 @@ function { p=( $t ) ## now we're with /sbin and /bin... probably :) - npath+=( /sbin /bin ) + + ## in case of merged /usr + [ -h /sbin ] || npath+=( /sbin ) + [ -h /bin ] || npath+=( /bin ) npath+=( $p ) ## finally... games! xD @@ -41,6 +44,7 @@ function { path=( ${npath} ) hash -f } +z-sort-path unset GREP_OPTIONS unset LS_OPTIONS