Documentation ¶
Index ¶
- Constants
- Variables
- func EPrint(message string)
- func EPrintf(format string, args ...interface{})
- func EPrintln(message string)
- func ESprint(message string) string
- func ESprintf(format string, args ...interface{}) string
- func GetInputOfSelectIndex(list []string) int
- func GetInputOfYesNo(msg string) bool
- func Print(message string)
- func Printf(format string, args ...interface{})
- func Println(message string)
- func QPrint(message string)
- func QPrintf(format string, args ...interface{})
- func QPrintln(message string)
- func QSprint(message string) string
- func QSprintf(format string, args ...interface{}) string
- func Scanf(format string, capture ...interface{}) (int, error)
- func ShowHelp()
- func Sprint(message string) string
- func Sprintf(format string, args ...interface{}) string
- type Command
- type CommandList
- func (cl CommandList) Add(name, cmd string)
- func (cl CommandList) Find(name string) *Command
- func (cl CommandList) FindIndex(index int) *Command
- func (cl CommandList) GetMaxNameSize() (max int)
- func (cl CommandList) Kill(name string) (killed bool)
- func (cl CommandList) Len() int
- func (cl CommandList) Less(i, j int) bool
- func (cl CommandList) Swap(i, j int)
- type Config
- type Operation
- func (o *Operation) RunBullet(name string, nameOk bool, cmd string, cmdOk bool) int
- func (o *Operation) RunCommand(cmd string) int
- func (o *Operation) RunDefault(cmd string) int
- func (o *Operation) RunKill(name string) int
- func (o *Operation) RunList(list []string) int
- func (o *Operation) RunListMode(mode string) int
- func (o *Operation) RunShell(command string) int
- func (o *Operation) RunShellMode(shell string) int
- type Runner
- type Shell
Constants ¶
View Source
const ( MODE_LS = "ls" MODE_PECO = "peco" SHELL_BASH = "bash" SHELL_ZSH = "zsh" )
View Source
const ( SQ = 39 DQ = 34 )
View Source
const (
VERSION = "0.8.0"
)
Variables ¶
View Source
var ( RESET = ansi.ColorCode("reset") RED = ansi.ColorCode("red") REDB = ansi.ColorCode("red+b") GREEN = ansi.ColorCode("green") GREENB = ansi.ColorCode("green+b") MAGENTA = ansi.ColorCode("magenta") MAGENTAB = ansi.ColorCode("magenta+b") CYAN = ansi.ColorCode("cyan") CYANB = ansi.ColorCode("cyan+b") GANG = fmt.Sprint(MAGENTAB, "[gang] ", RESET) )
View Source
var BIND = regexp.MustCompile("(\\{:([0-9a-zA-Z\\.@\\-_]+?)\\})")
View Source
var DOUBLE_SPACE = regexp.MustCompile("\\s{2,}")
Functions ¶
func GetInputOfSelectIndex ¶
func GetInputOfYesNo ¶
Types ¶
type CommandList ¶
type CommandList []Command
func (CommandList) Add ¶
func (cl CommandList) Add(name, cmd string)
func (CommandList) Find ¶
func (cl CommandList) Find(name string) *Command
func (CommandList) FindIndex ¶
func (cl CommandList) FindIndex(index int) *Command
func (CommandList) GetMaxNameSize ¶
func (cl CommandList) GetMaxNameSize() (max int)
func (CommandList) Kill ¶
func (cl CommandList) Kill(name string) (killed bool)
func (CommandList) Len ¶
func (cl CommandList) Len() int
func (CommandList) Less ¶
func (cl CommandList) Less(i, j int) bool
func (CommandList) Swap ¶
func (cl CommandList) Swap(i, j int)
type Config ¶
type Config struct { ListMode string `json:"listmode"` Shell string `json:"shell"` Commands CommandList `json:"commands"` }
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
func NewOperation ¶
func (*Operation) RunCommand ¶
func (*Operation) RunDefault ¶
func (*Operation) RunListMode ¶
func (*Operation) RunShellMode ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.