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

Default to -filter instead of -silent in a pipeline. #115

Open
Janfel opened this issue Feb 3, 2021 · 1 comment
Open

Default to -filter instead of -silent in a pipeline. #115

Janfel opened this issue Feb 3, 2021 · 1 comment

Comments

@Janfel
Copy link

Janfel commented Feb 3, 2021

As of xclip 0.13, using xclip in a pipeline requires the user to explicitly add the -filter argument. Changing the default value from -silent to isatty(stdout) ? -silent : -filter would remove this need. The user could then write

foo | xclip | bar
# instead of 
foo | xclip -filter | bar
@Janfel Janfel changed the title Decide input/output mode based on whether stdin is interactive. Default to -filter instead of -silent in a pipeline. Feb 3, 2021
@hackerb9
Copy link
Collaborator

hackerb9 commented Feb 4, 2021

I agree with this suggestion. Making the most common case the easiest makes sense to me. If a script wants to ensure a specific mode instead of relying on autodetection, it could always specify -in/-out/-filter.

However, the maintainer of xclip is not yet convinced that using isatty() a good idea. Feel free to weigh in on #88 if you have any helpful thoughts.

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

No branches or pull requests

2 participants