发现了rlwrap这个好东西。
在Mac OS和Linux下一直都用bash,bash下命令的输入都是通过readline这个库来处理的。也就是说,上下箭头查看历史命令,Ctrl+r反向查找匹配历史输入,以及Ctrl+w, Ctrl+a等等操作都是由readline提供的。rlwrap提供了readline的封装!
rlwrap runs the specified command, intercepting user input in order to provide readline's line editing, persistent history and comp[......]
