Feature bash_completion for bash-base linux.#349
Merged
Conversation
|
Hi @Gchuchu ❤️ 感谢你的贡献!我们将在最少半小时,最多5天内阅读此 PR 并回复你 |
Contributor
|
👍👍👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature内容:
usr/share/bash-completion/completions/补全脚本说明
#204 更多说明请参考此issue
chsrc_completion.sh流程说明用户按下
Tab,会自动拦截并执行一次脚本逻辑取得划分好的单词数组,以及当前正在输入的部分。
手动获取单词内容,因为包含了
-dry等选项,所以需要区分选项和子命令根据命令或选项填充
COMPREPLYCOMPREPLY会自动反馈给用户终端使用说明
方法一:
chsrc,使得可以直接通过chsrc命令访问,参考README.md安装部分chsrc仓库feature_bashcompletion分支根目录引入配置文件git checkout -b feature_bashcompletion origin/feature_bashcompletion source tool/completion/bash_completion.sh方法二: