cmdline

package module
v0.0.0-...-7839f07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 11 Imported by: 2

README

cmdline

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Clear 内置命令,清屏

func Exit

func Exit()

Exit 退出mssh命令行

func GetCompleter

func GetCompleter() *readline.PrefixCompleter

GetCompleter 获取自动补全方法

func GetFunc

func GetFunc(name string) (interface{}, error)

GetFunc 获取执行方法

func Help

func Help(name string)

Help 显示帮助

func Interpret

func Interpret(in io.ReadCloser)

Interpret 解释输入流

func Regist

func Regist(group string, name string, fn interface{}, help string, usage string, params []*Param)

Regist 注册命令行方法

func Run

func Run(script string)

Run 内置命令,执行mssh脚本

func Setup

func Setup(prompt string, historyFile string, fn func(string))

Setup 解释器设置

func Vim

func Vim(filename string)

Vim 打开vim编辑器

Types

type Conf

type Conf struct {
	Prompt      string `ini:"prompt"`
	HistoryFile string `ini:"history_file"`
}

Conf 解释器配置

type FuncInfo

type FuncInfo struct {
	Group  string
	Name   string
	Fn     interface{}
	Help   string
	Usage  string
	Params []*Param
}

FuncInfo 方法信息

type Param

type Param struct {
	Name      string
	Type      string
	Necessity bool
	Desc      string
}

Param 参数信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL