Last active
October 18, 2016 20:53
-
-
Save drewvolz/cc348094c9a6f0ec141ea93c8ab8f9e1 to your computer and use it in GitHub Desktop.
rust-like formatting for C code
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
#!/bin/sh | |
if [ -z "$1" ]; then | |
dir=$(pwd) | |
else | |
dir=$1 | |
fi | |
files=$(find . -name "*.c" -o -name "*.h") | |
indent -nbad -bap -bbo -bc -br -brf -bli0 -brs -cbi4 -ce -cdw -cli4 -di4 -hnl -i4 -l99 -lc99 -lp -npcs -npsl -nut -ts4 $files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment