Refactor git-ignore-io and remove .gitignore

This commit is contained in:
LeeW 2015-09-08 20:23:53 +08:00
parent ccd5303040
commit 3ad2f6fa4a
2 changed files with 3 additions and 50 deletions

37
.gitignore vendored
View file

@ -1,37 +0,0 @@
# Created by https://www.gitignore.io/api/vim,osx
### Vim ###
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

View file

@ -1,9 +1,9 @@
#/bin/sh
#!/usr/bin/env bash
gitignore_io_url="https://www.gitignore.io/api/"
default_path="$HOME/.gi_list"
gi_list=`cat $default_path | tr "," "\n"`
gi_list=`cat $default_path | tr "," "\n\n"`
update_gi_list() {
curl -L -s "${gitignore_io_url}/list" > ~/.gi_list
@ -19,17 +19,7 @@ print_in_alphabetical_order() {
print_in_table_format() {
table_width=5
coulumn_width=25
counter=0
for item in $gi_list; do
printf "%-${coulumn_width}s" $item
counter=$(($counter+1))
if [[ $(($counter%$table_width)) -eq 0 ]]; then
echo
fi
done
echo
echo "$gi_list" | xargs -n $table_width | column -t
}
search() {