Documentation ¶
Index ¶
- Variables
- func ChangeYourCmdEnvironment(cmd *exec.Cmd) error
- func Chdir(in string) error
- func Exec()
- func ExecCommandString(cmd string) (string, error)
- func FilterInnerCmd(args []string) []prompt.Suggest
- func FirstCommandFunc(in prompt.Document, args []string) []prompt.Suggest
- func GetCommon(cmd, target string) string
- func GetCurrPath(in string) string
- func Home() (string, error)
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsPathExists(path string) bool
- func OptionsCompleters(args []string) []prompt.Suggest
- func ParseCd(path, cmd string) []prompt.Suggest
- func ParseExecutors(in string) (func(), bool)
- func ParseLs(path string) []prompt.Suggest
- func Test()
- type Cli
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Commands []prompt.Suggest
)
TODO: 解析alias
View Source
var (
Config *viper.Viper
)
View Source
var LivePrefixState struct { LivePrefix string IsEnable bool }
实时左标显示
Functions ¶
func ExecCommandString ¶
func FirstCommandFunc ¶
func FirstCommandFunc(in prompt.Document, args []string) []prompt.Suggest
用户自定义命令
func GetCurrPath ¶
func Home ¶
Home returns the home directory for the executing user.
This uses an OS-specific method for discovering the home directory. An error is returned if a home directory cannot be detected.
func IsPathExists ¶
func ParseExecutors ¶
* 解析执行命令函数 @param in // command from @result func() // function @result bool // 状态 是否执行
Types ¶
Click to show internal directories.
Click to hide internal directories.