Skip to content

Instantly share code, notes, and snippets.

@hage
Last active October 10, 2017 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hage/65511bfb1e4983ae16bac3b7156b8b31 to your computer and use it in GitHub Desktop.
Save hage/65511bfb1e4983ae16bac3b7156b8b31 to your computer and use it in GitHub Desktop.
HomeBrew の tmux 2.5 に日本語の文字幅を調整するパッチを当てる

これはtmux の Formula に East Asian Ambiguous Character を全角文字の幅で表示し、ボーダーラインを ascii 文字で表示するパッチをあててビルドするためのパッチです。

tmux にあてるパッチは tmux 2.3 以降において East Asian Ambiguous Character を全角文字の幅で表示する にあるものです。

以下のようにすれば、パッチが当たった tmux がインストールできます。

$ curl -L https://git.io/vdaib | sh
brew update && brew uninstall -f tmux && cd `brew formula tmux|xargs dirname` && curl -L https://git.io/vdaiE | patch && brew install -s tmux && rm tmux.rb.orig && git commit -am 'tmux East Asian Ambiguous Character Patch' && git config branch.master.mergeOptions '--no-edit'
diff --git a/Formula/tmux.rb b/Formula/tmux.rb
index 85ec4e1e2..26530ab1d 100644
--- a/Formula/tmux.rb
+++ b/Formula/tmux.rb
@@ -27,6 +27,10 @@ class Tmux < Formula
sha256 "05e79fc1ecb27637dc9d6a52c315b8f207cf010cdcee9928805525076c9020ae"
end
+ def patches
+ ["https://gist.github.com/z80oolong/e65baf0d590f62fab8f4f7c358cbcc34/raw/0207adb2d1ff4d6f5b860067723030d285456a4f/tmux-HEAD-ae5a62a5-fix.diff"]
+ end
+
def install
system "sh", "autogen.sh" if build.head?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment