From 06e4104ed19a59782648229ee11d29be04784a1d Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 05:56:39 +0000 Subject: [PATCH] feat: add starship config support to dotfiles push/pull MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add StarshipApp implementation in model/dotfile_starship.go - Update dotfiles_pull.go to include starship in available apps - Update dotfiles_push.go to include starship in available apps - Starship config file supported: ~/.config/starship.toml Fixes #87 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Le He --- commands/dotfiles_pull.go | 15 ++++++++------- commands/dotfiles_push.go | 1 + model/dotfile_starship.go | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 model/dotfile_starship.go diff --git a/commands/dotfiles_pull.go b/commands/dotfiles_pull.go index 7c78c2e..9206a89 100644 --- a/commands/dotfiles_pull.go +++ b/commands/dotfiles_pull.go @@ -58,13 +58,14 @@ func pullDotfiles(c *cli.Context) error { // Initialize all available app handlers allApps := map[string]model.DotfileApp{ - "nvim": model.NewNvimApp(), - "fish": model.NewFishApp(), - "git": model.NewGitApp(), - "zsh": model.NewZshApp(), - "bash": model.NewBashApp(), - "ghostty": model.NewGhosttyApp(), - "claude": model.NewClaudeApp(), + "nvim": model.NewNvimApp(), + "fish": model.NewFishApp(), + "git": model.NewGitApp(), + "zsh": model.NewZshApp(), + "bash": model.NewBashApp(), + "ghostty": model.NewGhosttyApp(), + "claude": model.NewClaudeApp(), + "starship": model.NewStarshipApp(), } // Process fetched dotfiles diff --git a/commands/dotfiles_push.go b/commands/dotfiles_push.go index e23ba1b..422f244 100644 --- a/commands/dotfiles_push.go +++ b/commands/dotfiles_push.go @@ -43,6 +43,7 @@ func pushDotfiles(c *cli.Context) error { model.NewBashApp(), model.NewGhosttyApp(), model.NewClaudeApp(), + model.NewStarshipApp(), } // Filter apps based on user input diff --git a/model/dotfile_starship.go b/model/dotfile_starship.go new file mode 100644 index 0000000..0e96e1b --- /dev/null +++ b/model/dotfile_starship.go @@ -0,0 +1,26 @@ +package model + +import "context" + +// StarshipApp handles Starship configuration files +type StarshipApp struct { + BaseApp +} + +func NewStarshipApp() DotfileApp { + return &StarshipApp{} +} + +func (s *StarshipApp) Name() string { + return "starship" +} + +func (s *StarshipApp) GetConfigPaths() []string { + return []string{ + "~/.config/starship.toml", + } +} + +func (s *StarshipApp) CollectDotfiles(ctx context.Context) ([]DotfileItem, error) { + return s.CollectFromPaths(ctx, s.Name(), s.GetConfigPaths()) +}