mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-13 00:36:17 -04:00
Merge pull request #13 from laggardkernel/fix-multi-selection
Fix multi selection in gitignore generation
Former-commit-id: f849552a52
This commit is contained in:
commit
4727156b5b
|
|
@ -159,7 +159,9 @@ __forgit_ignore_update() {
|
|||
}
|
||||
__forgit_ignore_get() {
|
||||
mkdir -p $FORGIT_GI_CACHE
|
||||
echo $@ |xargs -I{} bash -c "cat $FORGIT_GI_CACHE/{} 2>/dev/null || (curl -sL https://www.gitignore.io/api/{} |tee $FORGIT_GI_CACHE/{})"
|
||||
for item in "$@"; do
|
||||
cat "$FORGIT_GI_CACHE/$item" 2>/dev/null || (curl -sL "https://www.gitignore.io/api/$item" |tee "$FORGIT_GI_CACHE/$item")
|
||||
done
|
||||
}
|
||||
__forgit_ignore_clean() {
|
||||
[[ -d $FORGIT_GI_CACHE ]] && rm -rf $FORGIT_GI_CACHE
|
||||
|
|
|
|||
|
|
@ -155,7 +155,9 @@ forgit::ignore::update() {
|
|||
}
|
||||
forgit::ignore::get() {
|
||||
mkdir -p $FORGIT_GI_CACHE
|
||||
echo $@ |xargs -I{} bash -c "cat $FORGIT_GI_CACHE/{} 2>/dev/null || (curl -sL https://www.gitignore.io/api/{} |tee $FORGIT_GI_CACHE/{})"
|
||||
for item in "$@"; do
|
||||
cat "$FORGIT_GI_CACHE/$item" 2>/dev/null || (curl -sL "https://www.gitignore.io/api/$item" |tee "$FORGIT_GI_CACHE/$item")
|
||||
done
|
||||
}
|
||||
forgit::ignore::clean() {
|
||||
setopt localoptions rmstarsilent
|
||||
|
|
|
|||
Loading…
Reference in a new issue