// ReadInitFile reads keybindings and variable assignments from filename. // The default filename is the last filename used. func ReadInitFile(filename string) error { p := C.CString(filename) defer C.free(unsafe.Pointer(p)) if errno := C.rl_read_init_file(p); errno != 0 { return syscall.Errno(errno) } return nil }
// Parse a readline initialization file. // The default filename is the last filename used. func ReadInitFile(s string) error { p := C.CString(s) defer C.free(unsafe.Pointer(p)) errno := C.rl_read_init_file(p) if errno == 0 { return nil } return syscall.Errno(errno) }
// ReadInitFile reads keybindings and variable assignments from filename // (See rl_read_init_file http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#IDX267) func ReadInitFile(filename string) error { cfilename := C.CString(filename) err := C.rl_read_init_file(cfilename) C.free(unsafe.Pointer(cfilename)) if err != 0 { return syscall.Errno(err) } return nil }