Default to -filter instead of -silent in a pipeline. · Issue #115 · astrand/xclip · GitHub
Skip to content

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

Open

Description

@Janfel

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

Activity

  1. changed the title [-]Decide input/output mode based on whether stdin is interactive.[/-] [+]Default to -filter instead of -silent in a pipeline.[/+] on Feb 3, 2021
  2. hackerb9 commented on Feb 4, 2021

    @hackerb9
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions