Create a command:

------------------
#!/bin/bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

INPUT=$(cat /dev/stdin)
python -c "import json; print(json.dumps(${INPUT}))" | python -m json.tool
------------------



On 3 Jan 2018, at 12:34, Tuk Bredsdorff <tuk@tiktuk.net> wrote:

Hi,

is there a quick way to transform for instance

[Role, User, UserRole, SourceAddress, BulkMessage, Message, SingleSMSTemplate, Company, Contact]

into

[
Role,
User,
UserRole,
SourceAddress,
BulkMessage,
Message,
SingleSMSTemplate,
Company,
Contact
],

?

(In this case it's Python but it could be more or less any language.)

I do this so often manually, there must be a better way?

Thanks,
Tuk


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate