From b9a11b16fec80c5d68f8a215565da3624748197f Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Sat, 6 Sep 2014 22:44:18 +0300 Subject: [PATCH 1/4] fixed URL on github.io github.io moved to https and http returns 301 redirect --- plugins/gitignore/gitignore.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index be037d87..5bf30245 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl http://www.gitignore.io/api/$@ ;} +function gi() { curl https://www.gitignore.io/api/$@ ;} _gitignireio_get_command_list() { - curl -s http://www.gitignore.io/api/list | tr "," "\n" + curl -s https://www.gitignore.io/api/list | tr "," "\n" } _gitignireio () { From 69a0b280c7939406c930082469756e217d1bd789 Mon Sep 17 00:00:00 2001 From: Alex Shaindlin Date: Wed, 15 Oct 2014 09:33:49 -0400 Subject: [PATCH 2/4] Fix misspellings in gitignore plugin --- plugins/gitignore/gitignore.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 5bf30245..3f2a6dec 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,12 +1,12 @@ function gi() { curl https://www.gitignore.io/api/$@ ;} -_gitignireio_get_command_list() { +_gitignoreio_get_command_list() { curl -s https://www.gitignore.io/api/list | tr "," "\n" } -_gitignireio () { +_gitignoreio () { compset -P '*,' - compadd -S '' `_gitignireio_get_command_list` + compadd -S '' `_gitignoreio_get_command_list` } -compdef _gitignireio gi +compdef _gitignoreio gi From 04d1428fcbda05a96d54396679c6c74c7006b032 Mon Sep 17 00:00:00 2001 From: WooParadog Date: Thu, 9 Oct 2014 13:17:35 +0800 Subject: [PATCH 3/4] Fix gitignore curl, should follow redirects --- plugins/gitignore/gitignore.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 3f2a6dec..484c6a69 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,4 +1,4 @@ -function gi() { curl https://www.gitignore.io/api/$@ ;} +function gi() { curl -L https://www.gitignore.io/api/$@ ;} _gitignoreio_get_command_list() { curl -s https://www.gitignore.io/api/list | tr "," "\n" From b452cafb163cde6619ac741027251bed2709f78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 15 Oct 2014 17:17:04 +0200 Subject: [PATCH 4/4] Follow-redirect and silent mode curl throughout gitignore This commit completes previous efforts and standardizes both curl commands into using silent mode and following redirects in case the URL changes again in the future. --- plugins/gitignore/gitignore.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 484c6a69..481d487b 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl -L https://www.gitignore.io/api/$@ ;} +function gi() { curl -sL https://www.gitignore.io/api/$@ ;} _gitignoreio_get_command_list() { - curl -s https://www.gitignore.io/api/list | tr "," "\n" + curl -sL https://www.gitignore.io/api/list | tr "," "\n" } _gitignoreio () {