1

An example:

When I enter compgen -c to view all possible terminal commands I get something like this:

ll
ls
which
if
then
else
elif
fi
case
esac
for
select
while
until
do
done

and quite a bit more... but I can't see it all. When I scroll to the top of the output, I can't see the command I entered so it's obvious that the rest of the output is also not visible.

  • what terminal emulator are you using? – the_velour_fog Nov 12 '15 at 14:07
  • assume the default when it is not told ;) – Rinzwind Nov 12 '15 at 14:13
3

Make the scroll buffer larger. For the default terminal see edit > profiles > edit > scrolling and increase "limit scrollback". Example:

enter image description here

That will make it show more lines when you scroll up.

You can also use

compgen -c | more
compgen -c | less
compgen -c | most

(most requires it to be installed sudo apt-get install most) to make it show 1 page at a time.

Or if you have a LOT of lines that even the buffer has trouble with put the result in a text file and view that one.

compgen -c > temp.txt
vi temp.txt

vi you can use things like :2 to go to page 2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.