How can I do
{$several_commands} | less
and have less
considere it as several files and enable navigation using :n
and :p
.
That may not be the clearer explanation, so let us consider an example. I currently have a function
svndiff ()
{
for a in `svn status | \grep ^M | sed 's/M //'`;
do
svn diff $a | less;
done
}
The purpose obviously is to see with less
the difference of all my modified files. But with this syntax, I have to use key Q
to close one "file" and open the next one. I would like to be able to navigate between files with the less
commands :n
(next file) and :p
(previous file). How can I do that ?