xclip icon indicating copy to clipboard operation
xclip copied to clipboard

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

Open Janfel opened this issue 4 years ago • 1 comments

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 avatar Feb 03 '21 22:02 Janfel

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.

hackerb9 avatar Feb 04 '21 02:02 hackerb9