文件名称:go-gnureadline:GNU Readline 的 Go 绑定
文件大小:29KB
文件格式:ZIP
更新时间:2024-07-06 20:48:43
Go
Go 绑定到库 这提供了命令行输入、编辑和命令历史 概要 package main import ( "code.google.com/p/go-gnureadline" "fmt" "os" ) const HISTORY_FILE string = "my.history" func main () { var err error term := os . Getenv ( "TERM" ) gnureadline . ReadHistory ( HISTORY_FILE ) gnureadline . StifleHistory ( 10 ) // Maximum 10 history entries gnureadline . ReadInitFile ( ".inputrc" ) // Read in
【文件预览】:
go-gnureadline-master
----.travis.yml(91B)
----readline_test.go(1KB)
----data()
--------undo.inputrc(208B)
----helper_test.go(983B)
----bind.go(3KB)
----history_test.go(1KB)
----complete_test.go(294B)
----complete.h(326B)
----bind_test.go(279B)
----history.go(5KB)
----.gitignore(96B)
----complete.c(705B)
----Makefile(249B)
----demo()
--------demo-history.go(653B)
--------demo-complete.go(2KB)
--------demo-readline.go(3KB)
--------demo-bind.go(178B)
----README.md(2KB)
----readline.go(6KB)
----COPYING(34KB)
----complete.go(4KB)