5 ms·
That's an interesting case. Should it not just output to stdout and you have to pipe it to less? If you wanted it to always pipe to less you could just set up a
by aidos 12y ago
That's an interesting case. Should it not just output to stdout and you have to pipe it to less? If you wanted it to always pipe to less you could just set up an alias for it.
- kec 12y agoThe git diff and log commands are primarily intended for human consumption. I'm not the one you were relying to, but I think it makes sense that git defaults to make that consumption easier, even if it isn't strictly "Unix". (You can also disable this behavior and get a more Unix-y interface by default via gitconfig or on a case by case basis with --no-pager).
- aidos 12y agoFor sure, and in fact, I very happy with the current behaviour. I guess the pager is a case where it doesn't matter much if it's included or not since I guess it doesn't get in the way if you pipe to something else. Does it consume extra resources? git log | wc vs git log --no-pager | wc I'm sure it's neither here nor there in practice. More of a hypothetical question.
- pjc50 12y agoI've just realised that the best solution to this (which I've never seen) is for the shell or terminal emulator to capture long output into a pager for you once it exceeds a certain length.
- dkuntz2 12y agoI think there may be some flags in pagers to do this for you, but I can't remember for sure.
- emmelaich 12y agoI believe software should be written to to satisfy the common case and the common case is the non-expert.