It's a bit messy, but I got it in one line:
readarray <<< $(dir -1) dir_list; for line in "${dir_list[@]}"; do printf "%s\n" "$line"; done | xargs -I {} echo "$PWD/{}"
It separates each dir -1
into individual "line"s, then iterates the array, appending the echo
of $PWD
to each xargs
line.