How can I debug a series of piped commands in zsh?
One way to debug command-line pipes is to insert | tee debug.txt between two steps and look at the file debug.txt to check whether the previous steps are correct.