fix: fish下参数解析问题#548
Open
expecer wants to merge 1 commit into
Open
Conversation
Up to standards ✅🟢 Issues
|
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.
变更说明
修复
fish环境下clashctl的参数分发问题。当前
scripts/cmd/clashctl.fish中,clashctl会把第一个参数直接拼接成clash"$suffix",这会导致参数解析失败。在我的使用中,clashctl --help被错误解析成clash--help,显示错误修改内容
fish包装层中对各个子命令的显式分发-h/--help的处理fish下的行为与bash版本保持一致复现方式
修复前:
会报类似下面的错误:
fish: 未知的命令:clash--help
备注
这个问题我是在本机 fish 环境中复现并验证的,修复后已确认相关命令行为正常。第一次提交pr, 如果提交有问题就和我说说吧