Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加zsh补全 #52

Open
Cdmium opened this issue Nov 28, 2019 · 0 comments
Open

增加zsh补全 #52

Cdmium opened this issue Nov 28, 2019 · 0 comments

Comments

@Cdmium
Copy link

Cdmium commented Nov 28, 2019

可以在原本在bash的补全文件的基础上修改,然后通过.zshrc source加载,不知道可不可以在setup.sh中安装时进行自动设置。

# ~/.oh-my-zsh/completions/_wd
_wudao()
{
    optl=(
the
of
...
admitting
)
    compadd ${optl[@]}
}
compdef _wudao wd
# ~/.zshrc
source /home/yourname/.oh-my-zsh/completions/_wd

理论上~/.oh-my-zsh/completions/是在$fpath中,每次启动zsh时会该目录下的文件自动加载,但不知道为什么我的始终不行,最后在.zshrc中加了source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant