推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
yaotian
V2EX  ›  Python

在console下敲字实在是太累了

  •  
  •   yaotian · Jul 29, 2012 · 6404 views
    This topic created in 5211 days ago, the information mentioned may be changed or developed.
    最近常在终端下工作,由此想到,是不是也可以像sublime一样,ctrl+p,后那些经常用的命令直接出来,敲几个字母就完成一个命令的输入。

    当然,你也可以说可以用alias,可不能到一台机器上就设置一遍,太麻烦鸟。
    19 replies  •  2016-06-11 00:11:08 +08:00
    sinxccc
    sinxccc
    Jul 29, 2012
    1
    如今是个 shell 就有自动补全和搜索历史的功能吧?

    实际上常敲的命令就那么几种,基本都是搜历史+改改…
    reus
    reus
    Jul 29, 2012
    2
    默认按tab就有自动补全
    agassi_yzh
    agassi_yzh
    Jul 29, 2012
    3
    vim很舒服啊!!!
    skydiver
    skydiver
    Jul 29, 2012❤️1
    4
    在.inputrc里面加上两行:
    <pre>
    "\e[A":history-search-backward
    "\e[B":history-search-forward
    </pre>
    就可以用上下键寻找历史中以已经输入的字母开头的命令了。
    shiweifu
    shiweifu
    Jul 29, 2012
    5
    换成zsh,再clone份oh-my-zsh基本就能很安逸的使用了
    doyle
    doyle
    Jul 29, 2012
    6
    c-r不就行了。。。
    yaotian
    yaotian
    OP
    Jul 29, 2012
    7
    @doyle 此为正解,谢谢分享
    yaotian
    yaotian
    OP
    Jul 29, 2012
    8
    试了一下c-r还是不是很方便,它只能找到最后一个,切换起来也不是很流畅
    sinxccc
    sinxccc
    Jul 29, 2012
    9
    @yaotian 再按一次 C-r ...
    haha1903
    haha1903
    Jul 29, 2012
    10
    @sinxccc 9494
    wangzhen
    wangzhen
    Jul 29, 2012
    11
    sublime 是用着很爽
    xlaok
    xlaok
    Jul 29, 2012❤️1
    12
    最喜欢在console里面敲字了,很酷有没有
    c-r很好用,再加上oh-my-zsh,配置文件往坚果云里面一丢,舒舒服服
    phay
    phay
    Jul 29, 2012
    13
    0.bash, zsh 都有很不错的补全。至于配置应该有现成的,zsh更有oh-my-zsh。
    1.终端自带补全。URXVT折腾下应该有。os x下iterm2自带的补全还挺方便的
    2.配置请同步。
    yaotian
    yaotian
    OP
    Jul 30, 2012
    14
    @xlaok 哈哈,看来你敲的键盘还不够多。当敲键盘手指开始疼的时候,你就会想到一些省手指的工具了,呵呵。
    jiazhoulvke
    jiazhoulvke
    Jul 30, 2012
    15
    dropbox或者git同步配置
    Ricepig
    Ricepig
    Jul 30, 2012
    16
    欢迎使用power shell,哈哈哈
    Kvm
    Kvm
    Jul 31, 2012
    17
    用KVM OVER IP有时候输入一个字 后面出现一大堆 。。。。。。
    9hills
    9hills
    Aug 1, 2012
    18
    用zsh + oh my zsh吧。默认就非常好用

    比如你输入 abc,然后按上方向键,并不是和bash一样,显示abc开头的历史命令,而是显示包含abc的历史命令。而且tab补全非常强大,可以部分补全,而不是首字母补全。。。
    arrowna
    arrowna
    Jun 11, 2016
    19
    @Kvm 和网速有关系?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1337 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 19:25 · PVG 03:25 · LAX 11:25 · JFK 14:25
    ♥ Do have faith in what you're doing.