microtodd / yamledit

A python YAML commandline editor
MIT License
2 stars 2 forks source link

Support Boolean as value #6

Open andywerner opened 6 years ago

andywerner commented 6 years ago

yamledit.py -q -f config.yaml -o config.yaml -c firstRun true results in firstRun: 'true' but I expect firstRun: true (without quotes)

microtodd commented 6 years ago

Been thinking about this. The little bit of a challenge is that, how do you tell if "true" is supposed to be a boolean or a string of "true"? Same with numbers. If I did -c someValue 1, is that int 1 or a string "1"? I might go look at other tools to see how others handle this.