archlinuxcn / misc_scripts

Misc scripts that help Arch Linux CN
7 stars 6 forks source link

add rename-keyword #12

Closed renyuneyun closed 5 years ago

lilydjwg commented 5 years ago

Please use shellcheck...

lilydjwg commented 5 years ago

Wait, I don't think this worth a script. Doesn't a simple cmdline enough?

sed -i 's/.../.../' */lilac.yaml

这样子。

renyuneyun commented 5 years ago

嘛,其實就是很簡單的東西,核心就是兩行sed。主要是不知道會不會有什麼corner case需要考慮,所以寫成腳本。

本來比這個複雜一點,但改改就成這樣了。然後我昨晚不知道怎麼腦抽了就把它提了PR了……(似乎是當時覺得這樣比較好引用/指向?)

lilydjwg commented 5 years ago

你也没考虑什么 corner case 嘛。