Documentation ¶
Index ¶
Constants ¶
View Source
const LuaConfigKey = "*__xs_config"
Variables ¶
View Source
var ( // Version is the version of this software. // This value is overwritten by the build script. Version = "0.0.0" // CommitHash is the git commit hash of this software. // This value is overwritten by the build script. CommitHash = "unknown" )
View Source
var ListCommand = &cli.Command{ Name: "list", Aliases: []string{"ls"}, Usage: "List defined hosts", UseShortOptionHandling: true, Before: func(cCtx *cli.Context) error { debuglogger.Get(cCtx).IsDebug = false return nil }, Action: listAction, Flags: []cli.Flag{ listAllFlag, }, }
View Source
var SSHConfigCommand = &cli.Command{ Name: "ssh-config", Usage: "Output ssh_config to STDOUT", UseShortOptionHandling: true, Before: func(cCtx *cli.Context) error { debuglogger.Get(cCtx).IsDebug = false return nil }, Action: sshConfigAction, Flags: []cli.Flag{}, }
View Source
var ZshCompletion = &cli.Command{ Name: "zsh-completion", Usage: "Output zsh completion script to STDOUT", UseShortOptionHandling: true, Before: func(cCtx *cli.Context) error { debuglogger.Get(cCtx).IsDebug = false return nil }, Action: zshCompletionAction, Flags: []cli.Flag{ zshCompletionHostsFlag, }, }
Functions ¶
Types ¶
type Config ¶
type Config struct { Filepath string Hosts []*Host DebugLogger *debuglogger.Logger }
func (*Config) NewHostFilter ¶
func (cfg *Config) NewHostFilter() *HostFilter
type ConfigLoadError ¶
func (*ConfigLoadError) Error ¶
func (e *ConfigLoadError) Error() string
type Host ¶
type Host struct { Name string Description string Hidden bool SSHConfig map[string]string OnBeforeConnect []any OnAfterConnect []any OnAfterDisconnect []any }
func (*Host) SortedSSHConfig ¶
type HostFilter ¶
type HostFilter struct {
// contains filtered or unexported fields
}
func (*HostFilter) ExcludeHidden ¶
func (f *HostFilter) ExcludeHidden() *HostFilter
func (*HostFilter) GetHostByName ¶
func (f *HostFilter) GetHostByName(name string) *Host
func (*HostFilter) GetHosts ¶
func (f *HostFilter) GetHosts() []*Host
type SimpleTableWriter ¶
func (*SimpleTableWriter) Render ¶
func (t *SimpleTableWriter) Render() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.