Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Another ${(z)param} buglet



On Dec 8,  5:51pm, Peter Stephenson wrote:
} Subject: Re: Another ${(z)param} buglet
}
} On Tue, 07 Dec 2010 20:34:36 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > It doesn't understand about comments, and becomes confused by a
} > comment that contains an unbalance quote character.
} 
} I think you can fix this something like the following, although it's not
} particularly elegant.  Could make it strip comments instead of reporting
} them, otherwise you need to remove fields starting with a # by hand (if
} it's an unquoted #, it must be a comment).

Thanks for putting in this effort, but on reflection I think it's
important to be able to specify whether comments are handled or not.
There isn't yet a (Z) flag; perhaps we could make that the equivalent
of turning on interactivecomments, and leave (z) as it was?

I'm undecided on stripping comments vs. leaving them as "tokens" for
manual removal, but I lean to leaving them, as it's possible to remove
them once they've been parsed but it's practically impossible to put
them back once they're gone.

} I was... confident is not the right word... blatant enough to attempt
} to add some documentation to some of this.

Maybe this gives someone [*] enough to go on to be able to fix that
here-document problem I encountered.

[*] It won't be me, at least not until after the next 2 weeks are over.



Messages sorted by: Reverse Date, Date, Thread, Author