shenwei356 / csvtk

A cross-platform, efficient and practical CSV/TSV toolkit in Golang
http://bioinf.shenwei.me/csvtk
MIT License
999 stars 84 forks source link

rename: the order is not right when given multiple columns #221

Closed shenwei356 closed 1 year ago

shenwei356 commented 1 year ago

This bug is kindly reported by Matthew Croxen.

$ echo "one,two,three,four,five" | csvtk rename --fields "three,one" --names "3,1"
3,two,1,four,five
shenwei356 commented 1 year ago

It's kind of hard to solve with the current architecture.

shenwei356 commented 1 year ago

Solved by refactoring the code, it will be fixed in the next release.