Skip to content

Conversation

@theslimshaney
Copy link
Contributor

@theslimshaney theslimshaney commented Feb 8, 2020

Related to #996

This way we can give less fucks if we have more $

Before

>>> "$ $ echo hello world".replace("$", "", 1).strip()
'$ echo hello world'

After

>>> "$ $ echo hello world".lstrip("$ ")
'echo hello world'

@theslimshaney
Copy link
Contributor Author

This would also remove any leading spaces, like $<space><space>foo I don't think it's a problem but maybe it is.

@scorphus scorphus added this to the 3.31 milestone May 10, 2020
Copy link
Collaborator

@scorphus scorphus left a comment

Choose a reason for hiding this comment

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

Cool!

Can you please include some tests for that?

Thanks for contributing!

@theslimshaney
Copy link
Contributor Author

Added some tests, let me know what you think. and also updated .gitignore to exclude venv, and requirements.txt which was missing some packages

@theslimshaney
Copy link
Contributor Author

@scorphus ping

Copy link
Collaborator

@scorphus scorphus left a comment

Choose a reason for hiding this comment

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

Thanks, @theslimshaney! Please mind my comments below.

@scorphus
Copy link
Collaborator

Merged in 9201ce7. Thanks, @theslimshaney.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants