Add GI function

Former-commit-id: 2295111582
This commit is contained in:
Wenxuan 2017-11-28 19:58:59 +08:00
parent bb135ea0fb
commit af8f6f5015

View file

@ -71,6 +71,9 @@ gi() {
[[ $# -gt 0 ]] && args=($@) || args=($(cat $giIndex |nl -nrn -w4 -s' ' |fzf -m --preview="$preview" --preview-window="right:70%" |awk '{print $2}'))
gi-get ${args[@]}
}
GI() {
gi >> .gitignore
}
gi-update-index() {
mkdir -p $giCache
curl -sL https://www.gitignore.io/api/list |tr ',' '\n' > $giIndex