Documentation
¶
Overview ¶
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotInTmux = errors.New("not in a tmux session")
View Source
var FdCmd = &cobra.Command{ Use: "fd", Short: "List all dirs in home and lest u create the session else switches to one", SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { if err := Fd(); err != nil { return err } return nil }, }
fdCmd represents the fd command
View Source
var FgCmd = &cobra.Command{ Use: "fg", Short: "Select a GitHub repo, clone it if absent, and create a session", Long: `Uses the GitHub API to list available repositories. If the repository does not exist in ~/HOME/github.com/DnFreddie, it will be cloned and a tmux session created. Otherwise, it switches to an existing session.`, SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { if _reposDir == "" { _reposDir = os.ExpandEnv("${HOME}/github.com") } if _git_url != "" { return cloneAndTmux(_git_url, _reposDir) } if err := Fg(_reposDir); err != nil { return fmt.Errorf("error in Fg operation: %w", err) } return nil }, }
View Source
var FsCmd = &cobra.Command{ Use: "fs", Short: "Read .ssh/config and create or switch the tmux session ", SilenceUsage: true, Long: `Chose the Host and ssh into it wiht new tmux session created`, RunE: func(cmd *cobra.Command, args []string) error { if err := Fs(); err != nil { return err } return nil }, }
fsCmd represents the fs command
View Source
var VfCmd = &cobra.Command{ Use: "vf", Short: "Look on directories in home and open one in nvim in tmux pane", SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { if err := Vf(); err != nil { return err } return nil }, }
vfCmd represents the tn command
Functions ¶
Types ¶
type Path ¶
type Path string
Find searches for directories within the specified directory up to a depth of 3. It returns a slice of maps where each map contains the basename and absolute path of a directory. The function limits concurrent processing to 5 goroutines.
type Tmux ¶
type Tmux struct {
// contains filtered or unexported fields
}
func (*Tmux) CreateSession ¶
func (*Tmux) HasSession ¶
Click to show internal directories.
Click to hide internal directories.