clink: 让Windows Cmd拥有readline能力

用惯了Linux下的bash,在Windows下对于那个cmd.exe很恼火,且不说双引号区分参数这样的“高级”问题,就是调个历史命令都麻烦得很,命令行编辑能力相当弱。

最近发现了clink这个扩展,可以让cmd.exe拥有几乎readline的全部能力。

clink: Bringing Bash's powerful command line editing to Microsoft Windows' cmd.exe

http://code.google.com/p/clink/

  • Powerful Bash-like line editing from GNU's Readline library. Read more on Readline's keyboard shortcuts.
  • Superior path completion (TAB).
  • Paste from clipboard (Ctrl-V).
  • Support for the completion of executables/commands, and environment variables.
  • Undo/Redo (Ctrl-_ or Ctrl-X, Ctrl-U)
  • Improved command line history.
    • Persists across sessions.
    • Searchable (Ctrl-R and Ctrl-S).
    • History expansion (e.g. !!, !<string>, and !$).
  • Scriptable completion using Lua.

 

跟随cmd自动启动clink

clink的安装程序带有“Autorun when cmd.exe starts"选项,但如果你不想使用安装程序,又想要在启动cmd时自动启动clink,可以按如下办法:

  1. 打开注册表编辑器,找到(或者新建)HKEY_CURRENT_USER\Software\Microsoft\Command Processor
  2. 在该键下新建一个字符串项,名为AutoRun
  3. 将AutoRun的值设置为一个bat文件的路径,比如d:\cmdstart.cmd
  4. 编辑d:\cmdstart.cmd,里面写一句 d:\tools\clink /inject (当然你也可以再添加其他命令)

 

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值