`
mryufeng
  • 浏览: 982427 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

5 tty - A command line interface

阅读更多
记住这些快捷键shell操作的时候速度快很多!


5 tty - A command line interface

tty is a simple command line interface program where keystrokes are collected and interpreted. Completed lines are sent to the shell for interpretation. There is a simple history mechanism, which saves previous lines. These can be edited before sending them to the shell. tty is started when Erlang is started with the command:

erl

tty operates in one of two modes:

    * normal mode, in which lines of text can be edited and sent to the shell.
    * shell break mode, which allows the user to kill the current shell, start multiple shells etc. Shell break mode is started by typing Control G.

5.1 Normal Mode

In normal mode keystrokes from the user are collected and interpreted by tty. Most of the emacs line editing commands are supported. The following is a complete list of the supported line editing commands.

Note: The notation C-a means pressing the control key and the letter a simultaneously. M-f means pressing the ESC key followed by the letter f.
tty text editing Key Sequence Function
C-a Beginning of line
C-b Backward character
M-b Backward word
C-d Delete character
M-d Delete word
C-e End of line
C-f Forward character
M-f Forward word
C-g Enter shell break mode
C-k Kill line
C-l Redraw line
C-n Fetch next line from the history buffer
C-p Fetch previous line from the history buffer
C-t Transpose characters
C-y Insert previously killed text
5.2 Shell Break Mode

tty enters shell break mode when you type Control G. In this mode you can:

    * Kill or suspend the current shell
    * Connect to a suspended shell
    * Start a new shell

分享到:
评论
5 楼 mryufeng 2009-03-09  
man readline
4 楼 mryufeng 2009-03-08  
是realine标准的, 所有的语言都是这么干的
3 楼 joshzhu 2009-03-08  
1、拜风神!
2、友情提示,实际上这些快捷键都是readline的快捷键,和Emacs的操作方式也形同。
2 楼 mryufeng 2009-03-08  
programging erlang书上有讲呀!
1 楼 cryolite 2009-03-08  
shell break mode的用法能举些例子么

相关推荐

Global site tag (gtag.js) - Google Analytics