Skip to content

Feature: Repeat Ctrl commands#613

Open
Exar04 wants to merge 3 commits intocharmbracelet:mainfrom
Exar04:repeatFeatureForCtrl
Open

Feature: Repeat Ctrl commands#613
Exar04 wants to merge 3 commits intocharmbracelet:mainfrom
Exar04:repeatFeatureForCtrl

Conversation

@Exar04
Copy link

@Exar04 Exar04 commented Apr 18, 2025

solve issue #340

@Exar04 Exar04 requested a review from a team as a code owner April 18, 2025 11:59
@Exar04 Exar04 requested review from raphamorim and removed request for a team April 18, 2025 11:59
@raphamorim
Copy link
Member

Nice! Could you add a test about the implementation? 🙏

@Exar04
Copy link
Author

Exar04 commented Apr 21, 2025

I added a test for this. Let me know if its enough, or I need to add more.

Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments, looks good otherwise

parser/parser.go Outdated
Comment on lines 160 to 161
// return []Command{p.parseCtrl()}
return p.parseCtrl()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// return []Command{p.parseCtrl()}
return p.parseCtrl()
return p.parseCtrl()

parser/parser.go Outdated
return Command{Type: token.CTRL, Args: ctrlArgs}
repeat, _ := strconv.Atoi(p.parseRepeat())

var cmds []Command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var cmds []Command
cmds := make([]Command, 0, repeat)

@Exar04
Copy link
Author

Exar04 commented Apr 22, 2025

Updated accordingly.

@raphamorim
Copy link
Member

Nice! thank you

@dimitry-ishenko
Copy link

Is anything stopping this from being merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants