Skip to content
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

fix: naming a alias command with the command name inside of alias #73

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

ratogabriel
Copy link
Contributor

@ratogabriel ratogabriel commented Oct 11, 2021

The for loop used to extract command and add args dosen't work when the
alias has the same name as the comand itself, beside it I saw no reason
to keep using a for loop to extrac args


  • I have reviewed CONTRIBUTING.md.
  • My commits and title use the Conventional Commit format.
  • I have documented any breaking changes according to SemVer.

@TorchedSammy
Copy link
Member

the for loop is for an alias of an alias, this is basically just reverting what i did for it to do that

@ratogabriel
Copy link
Contributor Author

the for loop is for an alias of an alias, this is basically just reverting what i did for it to do that

Ok... I can do it other way around

@ratogabriel
Copy link
Contributor Author

So, I came with the idea of resolving the alias names right in the moment of creating it, that way I think we dont need to do much afterwards. What you think?

@TorchedSammy
Copy link
Member

TorchedSammy commented Oct 12, 2021

well we dont want to block it, its why the for loop is there in the first place
so instead of doing that, after checking and replacing the alias u can just check if the alias name and the command that is aliased is the same. if so, break the loop (only do this after expanding though*)
if you do that, can u git reset then force push to remove the other commits?

@ratogabriel
Copy link
Contributor Author

I think this is it, did what you proposed and worked

Copy link
Member

@TorchedSammy TorchedSammy left a comment

Choose a reason for hiding this comment

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

very nice

@TorchedSammy TorchedSammy merged commit c29b6c6 into Rosettea:master Oct 12, 2021
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.

2 participants