-
-
Notifications
You must be signed in to change notification settings - Fork 38
Description
The original info command's ouput works well with a human reader. However, it is not working well with cli command as the user need to remove formatting character themselves to obtain the actual data. For example:
$ leetgo info 1 | grep Slug
�[37;40m Slug �[0m�[37;40m two-sum �[0mIn the above use case, I think a query alike command that prints unformatted output with property filter like slug, title, tags, testcase,etc will be helpful.
The query could using the following format: leetgo query qid [property]. For example:
$ leetgo query 1 slug
two-sumI created a fork to demo one draft of the query command. There should be a better way to map the property of the question struct than the naive switch function. If you have a better approach, I am happy to adapt that.
Kindly let me know if you are interested in adding this command or there might be some better approaches! I am happy to be of help if possible.
Also, thank you sincerely for this wonderful tool! It makes my life a lot eaiser :)