summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom/plugins/gitignore/gitignore.plugin.zsh12
1 files changed, 12 insertions, 0 deletions
diff --git a/custom/plugins/gitignore/gitignore.plugin.zsh b/custom/plugins/gitignore/gitignore.plugin.zsh
new file mode 100644
index 000000000..332497cec
--- /dev/null
+++ b/custom/plugins/gitignore/gitignore.plugin.zsh
@@ -0,0 +1,12 @@
+function gi() { curl http://gitignore.io/api/$@ ;}
+
+_gitignireio_get_command_list() {
+ curl -s http://gitignore.io/api/list | tr "," "\n"
+}
+
+_gitignireio () {
+ compset -P '*,'
+ compadd -S '' `_gitignireio_get_command_list`
+}
+
+compdef _gitignireio gi \ No newline at end of file