Skip to content

Instantly share code, notes, and snippets.

@ahmadnassri
Last active November 3, 2018 17:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadnassri/9aaf58e45b6de5b01c4bb91281dc0a1b to your computer and use it in GitHub Desktop.
Save ahmadnassri/9aaf58e45b6de5b01c4bb91281dc0a1b to your computer and use it in GitHub Desktop.
run `git status` on all sub directories
#!/usr/bin/env bash
find . -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -I {} bash -c 'echo -e "$(if [[ -z $(git -C {} status -s) ]]; then echo "\e[32m✔"; else echo "\e[31m✖"; fi) $(basename {})"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment