golf icon indicating copy to clipboard operation
golf copied to clipboard

format-problem-post.sh script

Open eraserhd opened this issue 7 years ago • 4 comments

eraserhd avatar Sep 19 '18 14:09 eraserhd

Are you sure you can't replace all that with an awk script? It seems highly inefficient.

lenormf avatar Sep 19 '18 16:09 lenormf

@lenormf Maybe? But it was a learning experience and I think, "When in Rome..."

Also, I'm pretty sure that it could be a more simple kak script. I'll update it as I use it.

One thing I learned is that I want to break up a large Kakoune script with whitespace (the way you can with sed using multiple -e options, or the way you can with whitespace. I'll make a ticket in the Kakoune repo for that.

eraserhd avatar Sep 20 '18 12:09 eraserhd

I think you're describing the behavior discussed in this issue, minus the newlines that would be split (as if they were delimiting independent exec calls). Might happen shortly.

lenormf avatar Sep 21 '18 05:09 lenormf

@lenormf I don't think that applies here, since that is for quoting inside the application and this is for Kakoune's command-line parameters.

(It's probably possible to use -e instead of -f for this, in which case I could use those quoting rules, except that -f does a bunch of other nice things like read from stdin and not require a tty.)

eraserhd avatar Sep 26 '18 10:09 eraserhd