Merge pull request #200541 from Homebrew/bump-roam-147.0.0-beta001
[Homebrew/homebrew-cask.git] / Casks / w / wezterm@nightly.rb
blob548a88c6aa194c3e747afcf3a6f12acc4494eff9
1 cask "wezterm@nightly" do
2   version :latest
3   sha256 :no_check
5   url "https://github.com/wez/wezterm/releases/download/nightly/WezTerm-macos-nightly.zip",
6       verified: "github.com/wez/wezterm/"
7   name "WezTerm"
8   desc "GPU-accelerated cross-platform terminal emulator and multiplexer"
9   homepage "https://wezfurlong.org/wezterm/"
11   conflicts_with cask: "wezterm"
13   app "WezTerm.app"
14   %w[
15     wezterm
16     wezterm-gui
17     wezterm-mux-server
18     strip-ansi-escapes
19   ].each do |tool|
20     binary "#{appdir}/WezTerm.app/Contents/MacOS/#{tool}"
21   end
23   binary "#{appdir}/WezTerm.app/Contents/Resources/shell-completion/zsh",
24          target: "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_wezterm"
25   binary "#{appdir}/WezTerm.app/Contents/Resources/shell-completion/bash",
26          target: "#{HOMEBREW_PREFIX}/etc/bash_completion.d/wezterm"
27   binary "#{appdir}/WezTerm.app/Contents/Resources/shell-completion/fish",
28          target: "#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d/wezterm.fish"
30   preflight do
31     # Move "WezTerm-macos-#{version}/WezTerm.app" out of the subfolder
32     staged_subfolder = staged_path.glob(["WezTerm-*", "wezterm-*"]).first
33     if staged_subfolder
34       FileUtils.mv(staged_subfolder/"WezTerm.app", staged_path)
35       FileUtils.rm_r(staged_subfolder)
36     end
37   end
39   zap trash: "~/Library/Saved Application State/com.github.wez.wezterm.savedState"
40 end