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
✨ Add -n option to prevent newline after emoji #12
✨ Add -n option to prevent newline after emoji #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea and the code implementation looks really good to me!
But now that I am looking over the whole picture - I am wondering if there is actually a time when we do want to paste the newline character as well?
I can't really think of a situation where we want both the emoji and a newline character after (that could not be solved by paste and pressing enter). Perhaps your implemented behaviour should actually be the only or at least default one.
I also tried to add a BATS test for this new |
As for the default behaviour: I'd rather keep |
This is a good point, I remember having trouble with the bats regexes in some other tests. You probably have this correct but just wanna point it out nonetheless, the option is Anyway, I think it's an option that would be really worth to have a little test for, I'll also see how we could implement it over the coming days! |
Well, after quite a bit of fiddling I managed to make the tests work. Turns out we have to invoke the tests with This now looks good as is - though I'm still not fully convinced of the necessity to keep the old behavior if we both can't think of any newline containing use case. |
Added simple documentation for option in the project's markdown README file, and add a quick line in changelog additions.
I added some quick documentation. @nobodyinperson I think this looks good now and if you agree I'm finally ready to merge! :) |
Looks good to me 👍 |
This Merge Request add the
bemoji -n
option to not include a newline character after the selected emoji.A newline after the emoji might or might not be wanted, which this option the user can choose.
In my case I don't want the newline as pasting it into
xfce4-terminal
a warning is shown whenever pasting something with newlines in it.