![]() |
![]()
| ![]() |
![]()
NAMEedlin - Line and input interpretter for the erlang shell. DESCRIPTIONThis module reads input, handles any escape sequences that have been configured via edlin_key and outputs action requests. The action requests are handled either by modules group or the user_drv. KEY CONFIGURATIONYou can setup a custom key configuration that overrides the default key configuration. This is done by setting the stdlib application parameter shell_keymap before Erlang is started. If you want to have the same keymap in all Erlang shells you can do so by putting a config file in your user's home directory and then set ERL_FLAGS to load it at startup. For example: $ cat $HOME/.erlang_keymap.config [{stdlib, The current keymap configuration can be fetched through edlin:keymap(). If a custom keymap or keymap file is specified, then it will be merged with the default keymap. The keymap is a map of maps where the keys in the parent map corresponds to different editing modes in the shell. The valid modes currently supported are normal and search. The keys in the child maps are the escape sequences that are sent from the terminal when a key is pressed and each value is a valid action as seen below. The default atom is used to specify that an action should happen when a key is pressed that does not have any mapping. Typically used to exit a mode. See tty - A Command-Line Interface for more information about the default keymap. ACTIONSThe commands below are the built-in action requests for switching input modes on the normal shell or navigating, or manipulating the line feed. The line feed supports multiple lines.
DATA TYPESkeymap() = #{atom() => #{string() | default => atom()}} A map of maps for each shell mode containing key, action pairs. EXPORTSkeymap() -> keymap() Types: keymap() = #{atom() => #{string() | default => atom()}} Get the current keymap used in the shell. Each key in the parent map represents a shell mode e.g. normal or search. Each map associated with the shell modes contains key sequences represented as strings, paired with an action, which is one of the valid actions mentioned above.
|