求教如何设置 zsh 补全

2015-02-19 01:34:16 +08:00
 1423

比如运行 brew info youtube-dl,下面显示

youtube-dl: stable 2015.02.11 (bottled), HEAD
http://rg3.github.io/youtube-dl/
/usr/local/Cellar/youtube-dl/2015.02.11 (8 files, 948K) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/youtube-dl.rb
==> Dependencies
Optional: rtmpdump ✘
==> Options
--with-rtmpdump
    Build with rtmpdump support
--HEAD
    Install HEAD version
==> Caveats
To use post-processing options, `brew install ffmpeg` or `brew install libav`.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions

问题是我知道 zsh completion has been installed to xxx 了,那怎么使用呢?

搜索了好久,只找到一个说似乎与 fpath 有关,但我的 fpath 含有 /usr/local/share/zsh/site-functions

5133 次点击
所在节点    Linux
5 条回复
jprovim
2015-02-19 07:53:20 +08:00
gt11799
2015-02-19 10:32:10 +08:00
1423
2015-02-19 15:28:42 +08:00
1423
2015-02-19 15:30:29 +08:00
@jprovim 直接 source 提示 can only be called from completion function ,求教怎么正确的 source
msg7086
2015-02-20 03:21:52 +08:00
@1423 oh-my-zsh不算zsh么……

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/171731

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX