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

Remove trailing newline when STDOUT is piped #44

Open
spenserblack opened this issue Jul 10, 2024 · 1 comment · May be fixed by #45
Open

Remove trailing newline when STDOUT is piped #44

spenserblack opened this issue Jul 10, 2024 · 1 comment · May be fixed by #45

Comments

@spenserblack
Copy link

For example, I can use xcolor | xclip -selection clipboard to copy the color to the clipboard. Whenever I do this, it's copied with the trailing newline. So when I paste it into code, it's slightly annoying because I have to manually remove the newline. For example, if I was going to paste a selected color into a Markdown comment (#347d39) I wouldn't want the trailing newline.

@spenserblack
Copy link
Author

spenserblack commented Jul 10, 2024

Oh, gosh, I've been using this tool for a long time without knowing that xcolor takes the -s clipboard option, so I never needed to pipe to xclip 🤦 😅 Just found out now from digging into the code.

Still, this could be handy just for compatibility with other use-cases that might involve piping.

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 a pull request may close this issue.

1 participant