3 ms·
does it have automated paging like git? doesn't look like it.
by mgaunard 5y ago
does it have automated paging like git? doesn't look like it.
- lancebeet 5y agoCan't you just do something like if [[ -p /dev/stdout ]]; then ls; else ls | less -F -R; fi
- efdee 5y agoPeak HN right here.
- timmytokyo 5y agoYou lose the colors by piping through less.
- eMSF 5y agoNo you do not. Also, unless I'm mistaken, git uses the system pager for pagination and that happens to be less on almost all modern Linux systems (and many others).
- ajdude 5y agoIt depends. Most of the coreutils won't send color if you're piping unless you explicitly tell it to do so. ls is one of those; try --color=always instead of --color=auto, and be sure to use "less -R" on the other side of the pipe.
- CyberShadow 5y agoI think, except for very large volumes, automated paging is inferior to terminal scrollback. It is conditionally modal (thus conflicts with muscle memory) and you can't see previous output and the paged output at the same time (quitting the pager restores the terminal contents). I turned mine off in Git.