News for hackers. Stuff that matters.
Re:Show HN: SHML (shell markup language) by ianbicking on Thursday November 05, 2015 @11:26PM (#10517828)
I'm a little surprised something like "$(fgcolor red hello)" requires a $(fgcolor end) - if you include arguments shouldn't it be self-closing? Then you get nice things like "$(fgcolor red " $(hr)")"

$(title "header") could be cool, outputting " header$(br)------"

An alias for \r could be nice, to go with $(br).

Re:Show HN: SHML (shell markup language) by burke on Friday November 06, 2015 @12:15AM (#10517955)
But if you've done: "$(fgcolor red)red text$(fgcolor green "green text") what color is this?"... then it would have to model a stack on top of the actual underlying implementation, which does not have any concept of "closing" a sequence to pop the colour back to the previous colour. It could automatically emit the \x1b[0m, but it would be making assumptions about nesting.