From ab711f4bee2b8d464007f0f4bd65a110168c1341 Mon Sep 17 00:00:00 2001 From: Andrew Berry Date: Thu, 23 Jul 2015 08:52:37 -0400 Subject: [PATCH] zsh: add upstream du completion patch Closes Homebrew/homebrew#42057. Signed-off-by: Dominyk Tiller --- Formula/zsh.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Formula/zsh.rb b/Formula/zsh.rb index e95a13c80a..b3ab1b5573 100644 --- a/Formula/zsh.rb +++ b/Formula/zsh.rb @@ -18,6 +18,12 @@ class Zsh < Formula option 'disable-etcdir', 'Disable the reading of Zsh rc files in /etc' + # zsh 5.0.8 broke du tab-completion for files, but this has been fixed in + # bug #35467. We ship our own version of the patch to avoid CHANGELOG + # conflicts. + # https://github.com/zsh-users/zsh/commit/806f73a0b3d3959d5af12ce97e0258b4d4fe7d76.patch + patch :DATA + def install args = %W[ --prefix=#{prefix} @@ -62,3 +68,15 @@ class Zsh < Formula EOS end end +__END__ +diff --git a/Completion/Unix/Command/_du b/Completion/Unix/Command/_du +index d8871cd..4065a20 100644 +--- a/Completion/Unix/Command/_du ++++ b/Completion/Unix/Command/_du +@@ -74,5 +74,5 @@ else + do + [[ $OSTYPE = $~pattern ]] && args+=( $arg ) + done +- _arguments -s -A "-*" $args ++ _arguments -s -A "-*" $args '*:file:_files' + fi