To diff the outputs of two command outputs, such as two ls's, run:

1  diff <(cd directory1; ls) <(cd directory2; ls)

This is assuming you are using bash, or a shell that can handle sub shells and pipes similar to bash such as zsh.