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

优化识别重定向 #2658

Merged
merged 3 commits into from
Sep 20, 2023
Merged

优化识别重定向 #2658

merged 3 commits into from
Sep 20, 2023

Conversation

Allan-QLB
Copy link
Contributor

重定向符号与文件名没有空格,或者重定向符号与前面的命令没有空格不能被识别,与 #1151 类似,将token首尾的重定向符分离出来

@hengyunabc
Copy link
Collaborator

感觉需要更多的测试,比如包含 ' , " 等字符的情况,甚至可能要考虑转义字符。

@Allan-QLB
Copy link
Contributor Author

Allan-QLB commented Sep 14, 2023

感觉需要更多的测试,比如包含 ' , " 等字符的情况,甚至可能要考虑转义字符。

确实,raw和value参数传反了,之前的测试case没发现
还有一个问题就是按照 #1151 的实现方式,调整后的token的raw值可能不正确
例如token: thread'|' 调整后前后两个token raw分别为:thread'| 和 |
这个raw的作用我看好像只是为了把token重组成完整的命令行,
所以是不是只要保证能拼接成原来的命令行就行
例如
thread'|' 分成thread'和|'
thre'ad|',分成thre'ad和|',就可以了

@Allan-QLB
Copy link
Contributor Author

@hengyunabc 已添加testcase,还有什么问题吗

@hengyunabc hengyunabc merged commit eede2aa into alibaba:master Sep 20, 2023
11 checks passed
@hengyunabc hengyunabc added this to the 4.0.0 milestone Sep 20, 2023
@Allan-QLB Allan-QLB deleted the redirect-token branch September 20, 2023 08:32
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

Successfully merging this pull request may close these issues.

2 participants