[Nix-dev] Newlines in nix strings - good look
Marc Weber
marco-oweber at gmx.de
Sun May 9 19:56:52 CEST 2010
Excerpts from Lluís Batlle i Rossell's message of Sun May 09 19:36:12 +0200 2010:
> Hello,
>
> often I hit the problem of wanting a string in a newline in some case, else
> no string. Something like:
> ''
> blabla
>
> ${if x then "xxx" else "yyy"}
>
> ${if z then "zzz" else "yyy"}
>
> blublu
> ''
>
> I don't like the result having two void lines. A nice example of what I don't
> want you can find at the upstart jobs. :)
> Have you thought of a comfortable nix source that looks simple both in source
> and result?
>
> Thank you,
> Lluís.
primop.removeDuplicateLinse ''
[..]
''
?
You could also use a git command. I forgot its name. But there is one
which does exactly that: removing duplicate lines.
In the end I personally don't care. Do you look that often at those
files?
Marc Weber
More information about the nix-dev
mailing list