>>>>> "MR" == Michal Rokos <michal@rokos.info> writes: MR> Junio is right, following is sufficent. Tested with 'more' too. MR> Idea-from: Junio C Hamano <junkio@cox.net> I appreciate the credit, but that is probably not needed in this case, since this is quite commonly used pattern. I've seen many people do just this: command | ${PAGER:-less} And if you think about it, you would realize that the above is good enough, and probably is a lot better than what you are doing. Your PAGER shell function gives "-R" indiscriminately when $PAGER_FLAGS is not set (or set to empty, which is even worse because you are not giving the user to override this _bad_ choice) without even checking if the $PAGER is something that understands "-R" (namely, "less"). I do not think users with their PAGER set to "more" or "cat" (I do the latter when I am working in Emacs) would appreciate that behaviour. On the other hand, if your user is a "less" user, and if the user wants it to honor ANSI "color" escape sequences, it would be more helpful to the user if you educate/encourage the user to have "LESS=R" in the environment and make that in effect everywhere less is used not just in Cogito. Giving that support silently just in Cogito at the first thought may seem to be more helpful but in reality it is not. So I would suggest to use the above form without defining your own PAGER shell function, and add a tip for "less" users to have "LESS=R" in their environment somewhere in the documentation. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Fri May 20 23:51:23 2005
This archive was generated by hypermail 2.1.8 : 2005-05-20 23:51:24 EST