加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

ksh – stty hupcl ixon ixoff

发布时间:2020-12-13 19:55:02 所属栏目:Linux 来源:网络整理
导读:我看到stty,而不是hpux上的打字机消息(尽管有交互式终端检查?),我猜这些是由于我的.kshrc文件中的stty行: case $- in*i* ) stty hupcl ixon ixoff stty erase '^?' kill '^U' intr '^C' eof '^D' susp '^Z';;esac 两个问题: 1) 我知道为什么擦除线在那里,
我看到stty,而不是hpux上的打字机消息(尽管有交互式终端检查?),我猜这些是由于我的.kshrc文件中的stty行:
case $- in
*i* )
    stty hupcl ixon ixoff
    stty erase '^?' kill '^U' intr '^C' eof '^D' susp '^Z'
;;
esac

两个问题:

1)
我知道为什么擦除线在那里,因为没有它就没有退格.我继承了这些.kshrc行,但不知道他们做了什么.

有人知道hupcl ixon ixoff线的意义吗? stty手册页不是特别有启发性:

hupcl (-hupcl)           Hang up (do not hang up) modem connection on
                         last close.

ixon (-ixon)             Enable (disable) START/STOP output control.
                         Output is stopped by sending an ASCII DC3 and
                         started by sending an ASCII DC1.

ixoff (-ixoff)           Request that the system send (not send)
                         START/STOP characters when the input queue is
                         nearly empty/full.

2)是否有不同的方法来检查交互式终端.我有tty -s;如果[$?之前,但在hpux上似乎也很吵.

解决方法

ixon和ixoff习惯于将Ctrl-s和Ctrl-q解释为控制流(滚动锁定)信号.它们是大多数系统的默认设置,但是如果您有快速连接和/或没有预期终端无法处理的输出量,您可以将它们关闭.

我通常使用stty -ixon -ixoff,因此我可以回收Ctrl-s和Ctrl-q键绑定以实现更现代的目的(例如“save”和“quit”).

有关详细信息:https://unix.stackexchange.com/questions/12107/how-to-unfreeze-after-accidentally-pressing-ctrl-s-in-a-terminal#12146

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读