Sample Header Ad - 728x90

How to query a particular field of brew cask/ formula info?

2 votes
1 answer
524 views
Homebrew version on my Mac: Homebrew 2.5.0-84-g9e697bd Take github (Cask for GitHub Desktop) for example, this is the cask file located in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/github.rb:
cask "github" do
  version "2.5.5-f57dc10d"
  sha256 "fe39c280c746b66d13dbcc5acfeb946f77b680954ecda2bf29a560a98a9d2638"

  # githubusercontent.com/ was verified as official when first introduced to the cask
  url "https://desktop.githubusercontent.com/releases/#{version}/GitHubDesktop.zip "
  appcast "https://github.com/desktop/desktop/releases.atom "
  name "GitHub Desktop"
  desc "Desktop client for GitHub repositories"
  homepage "https://desktop.github.com/ "

  auto_updates true

  app "GitHub Desktop.app"
  binary "#{appdir}/GitHub Desktop.app/Contents/Resources/app/static/github.sh", target: "github"

  zap trash: [
    "~/Library/Application Support/GitHub Desktop",
    "~/Library/Application Support/com.github.GitHubClient",
    "~/Library/Application Support/com.github.GitHubClient.ShipIt",
    "~/Library/Application Support/ShipIt_stderr.log",
    "~/Library/Application Support/ShipIt_stdout.log",
    "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.github.GitHubClient.sfl*",
    "~/Library/Caches/com.github.GitHubClient",
    "~/Library/Caches/com.github.GitHubClient.ShipIt",
    "~/Library/Preferences/com.github.GitHubClient.helper.plist",
    "~/Library/Preferences/com.github.GitHubClient.plist",
    "~/Library/Preferences/ByHost/com.github.GitHubClient.ShipIt.*.plist",
    "~/Library/Logs/GitHub Desktop",
  ],
      rmdir: "~/.config/git"
end
The Cask file has a desc field, and it's value is Desktop client for GitHub repositories. However, when I do brew search --desc github or brew search --cask --desc github, I only get github: GitHub Desktop, the desc field isn't included. Sometimes the desc field provides valuable information about a cask. So I wonder if there's a way to make desc included when doing brew search --desc for casks? Thanks!
Asked by Teddy C (1884 rep)
Sep 11, 2020, 12:57 AM
Last activity: May 12, 2025, 03:20 PM