Created
May 14, 2016 06:20
-
-
Save josuecau/0f09841abdd4b48abf58d557598a84fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Permet d'utiliser PHP-CS-Fixer en mode stdin/stdout, | |
# par exemple dans Vim avec `equalprg` | |
# | |
cmd=php-cs-fixer | |
hash "$cmd" 2>/dev/null || exit 1 | |
tmp=$(mktemp) | |
tee > "$tmp" | |
"$cmd" "$@" --quiet fix "$tmp" | |
cat "$tmp" | |
rm "$tmp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment