Skip to content

Commit 06e4104

Browse files
feat: add starship config support to dotfiles push/pull
- 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 <AnnatarHe@users.noreply.github.com>
1 parent fe98543 commit 06e4104

3 files changed

Lines changed: 35 additions & 7 deletions

File tree

commands/dotfiles_pull.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@ func pullDotfiles(c *cli.Context) error {
5858

5959
// Initialize all available app handlers
6060
allApps := map[string]model.DotfileApp{
61-
"nvim": model.NewNvimApp(),
62-
"fish": model.NewFishApp(),
63-
"git": model.NewGitApp(),
64-
"zsh": model.NewZshApp(),
65-
"bash": model.NewBashApp(),
66-
"ghostty": model.NewGhosttyApp(),
67-
"claude": model.NewClaudeApp(),
61+
"nvim": model.NewNvimApp(),
62+
"fish": model.NewFishApp(),
63+
"git": model.NewGitApp(),
64+
"zsh": model.NewZshApp(),
65+
"bash": model.NewBashApp(),
66+
"ghostty": model.NewGhosttyApp(),
67+
"claude": model.NewClaudeApp(),
68+
"starship": model.NewStarshipApp(),
6869
}
6970

7071
// Process fetched dotfiles

commands/dotfiles_push.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func pushDotfiles(c *cli.Context) error {
4343
model.NewBashApp(),
4444
model.NewGhosttyApp(),
4545
model.NewClaudeApp(),
46+
model.NewStarshipApp(),
4647
}
4748

4849
// Filter apps based on user input

model/dotfile_starship.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package model
2+
3+
import "context"
4+
5+
// StarshipApp handles Starship configuration files
6+
type StarshipApp struct {
7+
BaseApp
8+
}
9+
10+
func NewStarshipApp() DotfileApp {
11+
return &StarshipApp{}
12+
}
13+
14+
func (s *StarshipApp) Name() string {
15+
return "starship"
16+
}
17+
18+
func (s *StarshipApp) GetConfigPaths() []string {
19+
return []string{
20+
"~/.config/starship.toml",
21+
}
22+
}
23+
24+
func (s *StarshipApp) CollectDotfiles(ctx context.Context) ([]DotfileItem, error) {
25+
return s.CollectFromPaths(ctx, s.Name(), s.GetConfigPaths())
26+
}

0 commit comments

Comments
 (0)