fix config error in uv.toml
#186
Merged
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.
描述
问题的背景
当前
chsrc set uv命令存在两个问题chsrc set uv向该文件写入了错误的内容chsrc set uv本意修改 [[index]] 当前的 url,实际上会添加了一个新的 [[index]]相关 issue
N/A
这个PR做了什么
修复了上述两个问题,在更新 ~/.config/uv/uv.toml 时避免错误写 or 重复写
方案
实现
printf命令代替echo -e避免向文件中写入 '-e'sed命令避免向文件中写入冗余的 '[[index]]'测试
chsrc set uv xxx验证 uv.toml 是否正确更新