Ingo Schwarze wrote:

> So, i conclude neofetch(1) almost certainly does something even more
> crazy that you haven't mentioned, in addition to oozing ANSI escapes.
> 
> I don't sufficiently care about garbage programs like fortune(6) to
> install neofetch(1) and investigate what it is that it actually does.

Here is the offending line in neofetch, which unhides the cursor and
enables line wrap on exit:

# If the script exits for any reason, unhide the cursor.
trap 'printf "\e[?25h\e[?7h"' EXIT

The value of $env in security(8) evaluates the following string when
it breaks:

^[[?25h^[[?7hENV=

So I'm assuming bash exits without a terminating newline, or rather
the newline comes before the control code to reset the terminal. In
an interactive terminal this goes unnoticed but if you are parsing
the output for some crazy reason....

Honestly this is probably a corner case but in any circumstance the
output of stdout should not be trusted.... Thanks for the commit.

Regards
Lloyd

Reply via email to