[zsh] Fix path_lines
This commit is contained in:
parent
4c6625ce50
commit
2ea2071dd5
@ -1,8 +1,10 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
function path_lines {
|
function path_lines {
|
||||||
var="${1:-PATH}"
|
local var="${1:-PATH}"
|
||||||
split_by_char ":" "${!var}"
|
# This is a workaround to achieve variable indirection for both Bash and Zsh
|
||||||
|
eval "local value=\$$var"
|
||||||
|
split_by_char ":" "$value"
|
||||||
}
|
}
|
||||||
|
|
||||||
path_lines "$@"
|
path_lines "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user