diff options
Diffstat (limited to 'isort')
-rwxr-xr-x | isort | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -0,0 +1,8 @@ +#!/usr/bin/perl -p + +# isort -- sort C variable declarations separated by commas + +s/([^,]*?)(\S+[,;])/$2/; $prefix = $1; +s/;$/,/; @words = sort split /\s+/; +$_ = $prefix . (join ' ', @words) . "\n"; +s/,$/;/; |