Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am RoToRx88 on github.
  • I am rotor_ (https://keybase.io/rotor_) on keybase.
  • I have a public key whose fingerprint is 0ABF BB1F DC84 715A E817 7F31 66D1 EE82 C610 2B92

To claim this, I am signing this object:

@RoToRx88
RoToRx88 / gsubst.sh
Last active November 25, 2019 17:11
Get status of each submodule
#!/usr/bin/env zsh
git submodule foreach --recursive --quiet pwd | xargs -P8 -I{} zsh -c 'cd {} && pwd | {grep -o "[^/]*$"; git branch | grep \*;} | tr "\n\*" " " && $(git status --porcelain=v1 1>/dev/null) && echo " Clean" || echo " *Dirty*"; printf "\n"' | column -t
@RoToRx88
RoToRx88 / gsubex.sh
Last active November 5, 2019 09:46
Execute arbitrary command into submodule
#!/bin/bash
git submodule foreach --recursive --quiet pwd | xargs -P8 -I{} zsh -c "cd {} && $*"