#!/usr/bin/env zsh function path_lines { local var="${1:-PATH}" # This is a workaround to achieve variable indirection for both Bash and Zsh eval "local value=\$$var" split_by_char ":" "$value" } path_lines "$@"