Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindProjectFile ¶
FindProjectFile parses the cli arguments and returns a runtime configuration.
func ShimArgs ¶ added in v0.1.1
ShimArgs handle special cases when running the program: - If running without any arguments, default to the --help flag. - If running with a compound `project:windows` argument, split it.
func ShortenPath ¶ added in v0.2.0
ShortenPath returns a path with user's home replaced to ~/
Types ¶
type CLI ¶
type CLI struct { client.Options Start StartCmd `cmd:"" help:"Start a tmux session." aliases:"star,sta" default:"withargs"` Stop StopCmd `cmd:"" help:"Stop a tmux session." aliases:"sto"` Print PrintCmd `cmd:"" help:"Print the current tmux session's configuration." aliases:"pr,p"` List ListCmd `cmd:"" help:"List all projects, or project's windows." aliases:"l,ls"` Edit EditCmd `cmd:"" help:"Edit the a tmux session configuration." aliases:"ed,e"` New NewCmd `cmd:"" help:"Create a new tmux session." aliases:"ne,n"` Switch SwitchCmd `cmd:"" help:"Switch to existing tmux session." aliases:"swi,sw"` Version VersionCmd `cmd:"" help:"Display version information." aliases:"ver,v"` }
type EditCmd ¶
type EditCmd struct {
Project string `arg:"" optional:"" help:"Optional project name."`
}
type ErrConfigNotFound ¶
type ErrConfigNotFound struct{ Project, Path string }
func (ErrConfigNotFound) Error ¶
func (e ErrConfigNotFound) Error() string
type ListCmd ¶
type ListCmd struct {
Project string `help:"Optional project name to list windows." arg:"" optional:""`
}
type NewCmd ¶
type NewCmd struct {
Project string `arg:"" optional:"" help:"Optional project name."`
}
type PrintCmd ¶
type PrintCmd struct {
Session string `arg:"" optional:"" help:"Optional session name instead of current."`
}
type StartCmd ¶
type StartCmd struct { Project string `help:"Project name to stop." arg:"" optional:""` Variables map[string]string `help:"Variable to interpolate in session config." arg:"" optional:""` Windows []string `help:"List of windows to start. If session exists, those windows will be attached to current session." short:"w" sep:","` }
type StopCmd ¶
type SwitchCmd ¶
type SwitchCmd struct {
Session string `arg:"" optional:"" help:"Optional session name to switch to."`
}
type VersionCmd ¶
type VersionCmd struct{}
Click to show internal directories.
Click to hide internal directories.