-
Notifications
You must be signed in to change notification settings - Fork 22
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
翻译4.7 Enabling shell autocompletion #176
Conversation
Deploy succeeded Built with commit d83dce4 |
/review |
Note that sourcing the completion script in your shell enables Kubebuilder autocompletion. | ||
# 开启 shell 自动补全 | ||
|
||
Kubebuilder 的 Bash 补全脚本可以通过命令 `kubebuilder completion bash` 来自动生成,Kubebuilder 的 Zsh 补全脚本可以通过命令 `kubebuilder completion zsh` 来自动生成。需要注意的是在你的 shell 环境中运行补全脚本会开启 Kubebuilder 自动补全。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourcing这个关键词没翻译出来,此处的意思是,bash环境下就用kubebuilder completion bash
Zsh环境下就用kubebuilder completion zsh
获取补全脚本,然后要source一下才生效的意思。形如
source < (kubebuilder completion bash)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要注意的是在你的 shell 环境中运行补全脚本会开启 Kubebuilder 自动补全。 我将source译成运行。你这么一说我觉得source不翻译了。直接写成用source执行一下脚本。
|
||
The completion Bash script depends on [bash-completion](https://github.com/scop/bash-completion), which means that you have to install this software first (you can test if you have bash-completion already installed). Also, ensure that your Bash version is 4.1+. | ||
Bash 脚本补全依赖于[bash 补全](https://github.com/scop/bash-completion),这也就意味着你不得不首先安装此软件(如果你已经安装了 bash 补全,你可以进行测试)。此外,确保你的 Bash 版本是 4.1+。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bash-completsion 是个关键字,在centos下 yum install -y bash-completion
可以安装这个依赖的。 此处翻译成bash补全反而不好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,这个确实是。
ref: #82
[ ] Configuration Infrastructure
[x] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure