What is application mode in / zsh / terminfo terminals?

In several places I see some commands to ensure this terminal (?) Is in application mode, then the terminfo database will be used to establish key / request bindings.

I tried to find out what kind of application mode it was, but I was not successful. What is this application mode? I think Zsh can work fine without it. I'm right? Would it be advisable to disable it after processing key bindings? Won't some apps like these curses cancel it?

This is just one question: "What is application mode or how does it work." I wrote other questions to help you understand my problem.

+6
source share
1 answer

In case someone is faced with the same problem ... After some research, I found the answer to my question in the section one request for a preliminary request .

It can be summarized as follows:

  • Terminals
  • are vague and not universal. There were several different protocols for handling extensions that move the cursor, change color, and handle the inputs of a combination of user keys.
  • Someone has created a large database for abstract differences between different terminals and terminal emulators. This database is terminfo.
  • terminfo only works in application mode. Special escape sequences are output to the terminal, then it can change its mode. In the new mode, it will accept different escape sequences (those known to terminfo).
  • You can determine if application mode is supported and discarded by other methods (zkbd, ...) if not.
  • zsh common configurations setup zle (zsh line editor) to enter application mode before accepting user input and output before executing any commands. Then all applications will continue to behave normally.

Note. Not all common zsh configurations are reliable, and it is recommended that you read the previously mentioned prezto pull request .

The bits of my configuration are documented on my blog and are available on my git repo .

+3
source

All Articles