Skip to content

[sops] Sops ZSH shell autocompletion file has an empty newline at the start, preventing it from working. #292915

Description

@segevfiner

brew config AND brew doctor output OR brew gist-logs <formula> link

HOMEBREW_VERSION: 6.0.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 655769712a9a9499563d9685a8488f349354492d
Last commit: 6 days ago
Branch: stable
Core tap JSON: 13 Jul 09:05 UTC
Core cask tap JSON: 13 Jul 09:05 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DOWNLOAD_CONCURRENCY: 20
HOMEBREW_FORBID_PACKAGES_FROM_PATHS: set
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_REQUIRE_TAP_TRUST: set
Homebrew Ruby: 4.0.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/4.0.5_1/bin/ruby
CPU: deca-core 64-bit arm_firestorm_icestorm
Clang: 21.0.0 build 2100
Git: 2.55.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 26.5.1-arm64
CLT: 26.6.0.0.1781586589
Xcode: N/A
Rosetta 2: false



Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  zap

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
  • My issue is not about a failure to build a formula from source.

What were you trying to do (and why)?

I installed sops from brew: brew install sops amd tried using ZSH auto completion

What happened (include all command output)?

The resulting ZSH autocompletion file has a blank line before the #compdef sops line, preventing it from working

What did you expect to happen?

It should work out of the box.

Step-by-step reproduction instructions (by running brew commands)

1. `brew install sops`
2. `cat /opt/homebrew/share/zsh/site-functions/_sops`

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream issueAn upstream issue report is needed

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions