Как изменить поведение прокрутки readline на OS X?

370
Aadaam

Я использую SSHing в Mac OS X Terminal к двум серверам Ubuntu, затем подключаюсь к различным оболочкам с поддержкой readline, таким как MySQL или Mongo клиенты.

В последнее время кажется, что поведение прокрутки как-то изменилось. когда я прокручиваю мышью, вместо того, чтобы иметь возможность пролистывать страницы, как я ожидал, сама readline прокручивает команды.

То есть вместо того, чтобы видеть результаты в верхней части списка результатов SQL / mongo, я прокручиваю назад одну команду в командной строке, что я не хотел бы делать.

Насколько мне известно, ни серверы (Ubuntu 14.04), ни мой Mac существенно не изменились.

0

1 ответ на вопрос

0
Thomas Dickey

What you are describing sounds like this: some terminal emulators can be told to pretend that wheel-mouse events are up/down arrows rather than page-scrolling. While there may be a special control sequence or configuration setting (such as alternateScroll with xterm), generally that is activated by the switch to/from full-screen (or the alternate screen) in the terminal description.

While Apple provides no documentation for Terminal.app's escape sequences, I see in Yosemite introduces per-line scrolling in the Terminal a hint that they have done this also.

If this is the situation, then you should be able to work around by using a terminal description omitting the 47 or 1049 controls from the smcup and rmcup capabilities (and depending on whether you use screen, tmux or neither, the advice varies on how to do this — some of the advice is poor, specifically when it says to just remove the capabilities).