Skip to content

Feature: Repeat Ctrl commands #613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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

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.

3 participants