[TxMt] Re: How to break long line of code into multiple lines?

"Uğur Özyılmazel (vigo)" ugurozyilmazel at gmail.com
Thu Jan 4 21:38:37 UTC 2018


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
------------------


---
Uğur "vigo" Özyılmazel

https://github.com/vigo
https://gitbook.com/@vigo
http://ugur.ozyilmazel.com | @vigobronx
http://devpod.org | @podcastmaster
http://gelistiriciyiz.biz | @gelistiriciyiz

> On 3 Jan 2018, at 12:34, Tuk Bredsdorff <tuk at 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 at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20180105/8234ed91/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2018-01-05 at 00.37.58.png
Type: image/png
Size: 1043181 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20180105/8234ed91/attachment-0001.png>


More information about the textmate mailing list