浏览代码

gitignore: add newline to `gi` output (#7586)

* Add trailing new line at the end of output
* Double-quote variable expansion
Gianluca Recchia 5 年之前
父节点
当前提交
befdb4649b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/gitignore/gitignore.plugin.zsh

+ 1 - 1
plugins/gitignore/gitignore.plugin.zsh

@@ -1,4 +1,4 @@
-function gi() { curl -fL https://www.gitignore.io/api/${(j:,:)@} }
+function gi() { curl -fLw '\n' https://www.gitignore.io/api/"${(j:,:)@}" }
 
 _gitignoreio_get_command_list() {
   curl -sfL https://www.gitignore.io/api/list | tr "," "\n"