4

Since upgrading to Debian 12 (bookworm), the more command seems to have been changed and now comes to a stop when you reach the end of the file you are viewing and then displays "(END)", rather than just returning you to the command line (or prompting you to move on to the next file, if you are trying to view multiple files), as it did before.

It seems that I now need to press q to actually quit more to return to the command line - but this would then prevent me from viewing the next file(s) I had named (in the case of multiple files), and so in that case I would then need to explicitly use the "Go to next file" keyboard not-so-shortcut.

As someone with many years of muscle memory of <space> being the universal Do The Right Thing shortcut, this change is really very annoying!

Is there a way to make more revert to the previous more sensible behaviour, or is it maybe now sadly time for me to look into using a different file pager program instead?

2
  • You can go to the next file with :n, see the man page - not to be confused with n (repeat a search) or command-line options +n and -n. Many people these days prefer less(1), as recommended in the more(1) man page. Commented Nov 23, 2024 at 20:45
  • Yep, that's the "not-so-shortcut" (3 keystrokes, bah) that I was alluding to in my question. ;-) Maybe I should give less a try, but old habits die hard… Commented Nov 27, 2024 at 14:29

1 Answer 1

7

This was a change in behaviour in the implementation of more provided by util-linux 2.38. Before that, exit on EOF was enabled unless more wasn’t run in a terminal; in 2.38, exit on EOF was disabled by default to make more compliant with its POSIX specification (see also the patch email). This was reverted in 2.39 (more accurately, exit on EOF is now enabled unless POSIXLY_CORRECT is set), but Debian 12 ships 2.38.

However there is an option which enables exit on EOF: -e. So you can alias more to more -e to restore the old behaviour, at least when running more explicitly in your shell. To restore the behaviour in all cases, define a MORE environment variable:

export MORE=-e
2
  • Many thanks! Also good to know that this unfortunate change will go away again in a future release! :-) Commented Nov 21, 2024 at 12:47
  • Great, now less and more behave differently on EOF. Commented Nov 27, 2024 at 20:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.