(opened by request of Diego, per discussion) Gentoo ship's /etc/env.d/70less which has the -R option for less. sudo, by default, doesn't export LESS. This causes conflict with the etc updating tools (etc-update, dispatch-conf) because they have "pager=less" by default. less(1) reads $LESS so if you use something like colordiff in diff_command, all you see are escape codes. I consider this a regression in functionality and user-friendlyness and request that LESS is exported by default in sudo. A potention downside would be if LESS could be set to some exploit, but I think that less(1) would ignore that and treat the "exploit" as options to less itself. jolexa @ notos :: ~ %% export LESS=file # 'file' exists jolexa @ notos :: ~ %% less interview.txt # random text file Line number is required after -l # error output jolexa @ notos :: ~ %%
looks like a bad idea to me sudo env LESS=-o/foo less -f /dev/null ls -l /foo