zsh: bit better PATH
This commit is contained in:
parent
0ae83ee81b
commit
9012696fea
@ -1,7 +1,7 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
## sort-n-fill PATH
|
## sort-n-fill PATH
|
||||||
function {
|
z-sort-path() {
|
||||||
local -a p
|
local -a p
|
||||||
local -aU t npath games
|
local -aU t npath games
|
||||||
|
|
||||||
@ -31,7 +31,10 @@ function {
|
|||||||
p=( $t )
|
p=( $t )
|
||||||
|
|
||||||
## now we're with /sbin and /bin... probably :)
|
## 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 )
|
npath+=( $p )
|
||||||
|
|
||||||
## finally... games! xD
|
## finally... games! xD
|
||||||
@ -41,6 +44,7 @@ function {
|
|||||||
path=( ${npath} )
|
path=( ${npath} )
|
||||||
hash -f
|
hash -f
|
||||||
}
|
}
|
||||||
|
z-sort-path
|
||||||
|
|
||||||
unset GREP_OPTIONS
|
unset GREP_OPTIONS
|
||||||
unset LS_OPTIONS
|
unset LS_OPTIONS
|
||||||
|
Loading…
Reference in New Issue
Block a user