There I said it !

  • Morphit @feddit.uk
    link
    fedilink
    arrow-up
    2
    ·
    5 days ago
           -f --force
                  If the input data is not in a format recognized by gzip, and if the option --stdout is also given,
                  copy the input data without change to the standard output: let zcat behave as cat.
    

    I don’t know why this isn’t the top comment. I guess there might be some scenario where you’d want to know about non-gzip files where you don’t expect them so changing the defaults would probably cause some subtle breakage. For shell use though, just an alias could be used; alias zcat=gzip -cdf

    • huf [he/him]@hexbear.net
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 days ago

      in that case, i’d prefer a ~/bin/zcat with the contents

      #!/bin/sh
      exec gzip -cdf "$@"
      

      this way, it’s exec’able, unlike an alias or shell function.