Skip to content

Commit

Permalink
fix: delimeter delete command
Browse files Browse the repository at this point in the history
  • Loading branch information
costaluu committed Sep 15, 2024
1 parent 30830fe commit dbdd455
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/bubbletea/components/fileiterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/costaluu/flag/constants"
"github.com/costaluu/flag/logger"
"github.com/costaluu/flag/types"
)
Expand Down Expand Up @@ -56,7 +57,7 @@ func (m IteratorModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
// Everything's been installed. We're done!
m.done = true
return m, tea.Sequence(
tea.Printf(" %s", path.Path), // print the last success message
tea.Printf("%s %s", constants.CheckMark.Render(), path.Path), // print the last success message
tea.Quit, // exit the program
)
}
Expand All @@ -65,7 +66,7 @@ func (m IteratorModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.index++

return m, tea.Batch(
tea.Printf(" %s", path.Path), // print success message above our program
tea.Printf("%s %s", constants.CheckMark.Render(), path.Path), // print success message above our program
m.runner(m.paths[m.index]), // process the next path
)
case spinner.TickMsg:
Expand Down
6 changes: 2 additions & 4 deletions src/commands/delimeter.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ var DelimeterDeleteCommand *cli.Command = &cli.Command{
Action: func(ctx *cli.Context) error {
args := ctx.Args().Slice()

if len(args) != 3 {
logger.Result[string](fmt.Sprintf("usage: %s delimeters %s", constants.COMMAND, ctx.Command.ArgsUsage))

return nil
if len(args) != 1 {
logger.Result[string](fmt.Sprintf("usage: %s delimeters %s", constants.COMMAND, ctx.Command.ArgsUsage))
}

extension := args[0]
Expand Down

0 comments on commit dbdd455

Please sign in to comment.