Leave the last screen of output on screen when exiting so that it can be referenced for the next command.
Less does this with the -X option, for example.
❯ moar install.sh
❯
❯ less -X install.sh
#!/bin/bash
set -e -o pipefail
./test.sh
echo
echo 'Installing into /usr/local/bin...'
cp moar /usr/local/bin/moar
echo
echo 'Installed, try "moar moar.go" to see moar in action!'
❯
Leave the last screen of output on screen when exiting so that it can be referenced for the next command.
Less does this with the
-X
option, for example.