add tool to sort .gitignore content
We sort with lines starting with # first. We sort with lines starting with * second. We sort with lines that do not start with [#!*] third. We sort with lines starting with ! fourth. Example usage in vim with a keyboard macro <escape>f: ```vim :map ^[f 1G!G../../bin/sgi^M ``` or via .vimrc: ```vimrc " sort the entire .gitignore file using ../../bin/sgi :map ^[f 1G!G../../bin/sgi^M ``` NOTE: The ^[ above is ((Escape)) and ^M is ((Control-M)). Example usage in shell: ```sh rm -f t && ../../bin/sgi < .gitignore > t && mv -f t .gitignore ``` Suggested usage: ```sh bin/all-run.sh bin/sort.gitignore -v 1 ``` Sorted all winner .gitignore according to this method. Sorted all year level .gitignore according to this method. Sorted top level .gitignore according to this method.
This commit is contained in:
1 parent
5619029d33
commit
657a0be130
341 files changed
+919
-447
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
akari
|
||||
akari2
|
||||
akari2.c
|
||||
@@ -8,7 +9,6 @@ akari3.c
|
||||
akari4
|
||||
akari4.c
|
||||
akari.orig
|
||||
*.dSYM
|
||||
even_output.ppm
|
||||
expanded_and_rot13_output.txt
|
||||
expanded_output.txt
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
blakely
|
||||
blakely.orig
|
||||
*.dSYM
|
||||
garden.txt
|
||||
indent
|
||||
indent.c
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
borsanyi
|
||||
borsanyi.orig
|
||||
*.dSYM
|
||||
indent
|
||||
indent.c
|
||||
indent.o
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
dlowe
|
||||
dlowe.orig
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
eastman
|
||||
eastman.orig
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
ag
|
||||
ag.c
|
||||
*.dSYM
|
||||
fredriksson
|
||||
fredriksson.orig
|
||||
fredriksson.txt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
goren
|
||||
goren.orig
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
dragon
|
||||
dragon2
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
hou
|
||||
hou.orig
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
indent
|
||||
indent.c
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
indent
|
||||
indent.c
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
indent
|
||||
indent.c
|
||||
|
||||
+4
-4
@@ -1,8 +1,9 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
audio_file.raw
|
||||
|
||||
#
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
*.wav
|
||||
audio_file.raw
|
||||
indent
|
||||
indent.c
|
||||
indent.o
|
||||
@@ -10,4 +11,3 @@ prog.orig
|
||||
vik
|
||||
vik.alt
|
||||
vik.orig
|
||||
*.wav
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# sort with: sort -d -u
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
hello.ppm
|
||||
image2.ppm
|
||||
|
||||
Reference in new issue
Block a user