ascii-boxes/boxes

Outfile not recognized when -r is specified (box removal)

pidgeon777 opened this issue · 6 comments

This is what I actually do into Notepad++ to generate a box around a text selection, according to the docs:

boxes.exe -d stone -s 80 -ac "$(ascfile)" "$(tempfile)"

By doing so, it works.

But, if I want to remove the box through:

boxes.exe -r -d stone "$(ascfile)" "$(tempfile)"

then the resulting output is sent to the stdout (shown in NppExec console), and not to the $(tempfile) file, thus the originally selected text is replaced with an empty string.

I'm using boxes version 1.2.

Good catch! While this is being fixed, you can use the following workaround:

cmd /c boxes -r -d stone "$(ascfile)" > "$(tempfile)"

The NppExec manual actually says one should do it like this, but according to the boxes docs, what you did should have worked, too.

I updated the docs to avoid further confusion.
Fixing this in the code will take much longer, but we should be good for now. 😉

Thank you for the prompt reply, your proposed solution is actually working good. I also think it can be considered a good workaround until a solution to the bug will be found.

Fixed in master. This will go out with the next release, but be patient as that may take some time.

No problem, I will wait, then.

Released as 1.3