Merge: Semicolumn
authorJean Privat <jean@pryen.org>
Thu, 7 May 2015 01:56:10 +0000 (21:56 -0400)
committerJean Privat <jean@pryen.org>
Thu, 7 May 2015 01:56:10 +0000 (21:56 -0400)
commitd32bda1a2c6610af8e2f0ad22e7eaf15fd2b2331
treeff257336ede8d1c55ca2886ec255c1767b67b204
parentef58241b85e38fd834969456dac846493454ffdd
parent4c49a0392a65e59b183050de0aef54bccd0fca2f
Merge: Semicolumn

Propose that `;` is usable as a hard line break. While this is not really nit-ish, the only need is in fact to be able to write short one-line scripts in environment where linefeeds are not an option.

~~~sh
$ ./nit -e 'for line in stdin.each_line do; var xs = line.split(":"); if xs.not_empty then print xs.first; end' < /etc/passwd
~~~

Pull-Request: #1305
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>