Created
December 14, 2013 18:46
-
-
Save padde/7963205 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'formula' | |
| class Zsh < Formula | |
| homepage 'http://www.zsh.org/' | |
| url 'http://www.zsh.org/pub/zsh-5.0.2.tar.bz2' | |
| mirror 'http://downloads.sourceforge.net/project/zsh/zsh/5.0.2/zsh-5.0.2.tar.bz2' | |
| sha1 '9f55ecaaae7cdc1495f91237ba2ec087777a4ad9' | |
| depends_on 'gdbm' | |
| depends_on 'pcre' | |
| option 'disable-etcdir', 'Disable the reading of Zsh rc files in /etc' | |
| def install | |
| args = %W[ | |
| --prefix=#{prefix} | |
| --enable-fndir=#{share}/zsh/functions | |
| --enable-scriptdir=#{share}/zsh/scripts | |
| --enable-site-fndir=#{HOMEBREW_PREFIX}/share/zsh/site-functions | |
| --enable-site-scriptdir=#{HOMEBREW_PREFIX}/share/zsh/site-scripts | |
| --enable-cap | |
| --enable-maildir-support | |
| --enable-multibyte | |
| --enable-pcre | |
| --enable-zsh-secure-free | |
| --with-tcsetpgrp | |
| ] | |
| args << '--disable-etcdir' if build.include? 'disable-etcdir' | |
| system "./configure", *args | |
| # Do not version installation directories. | |
| inreplace ["Makefile", "Src/Makefile"], | |
| "$(libdir)/$(tzsh)/$(VERSION)", "$(libdir)" | |
| system "make install" | |
| # See http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Accessing-On_002dLine-Help | |
| mkdir "helpfiles" do | |
| system "man zshall | colcrt - | perl ../Util/helpfiles" | |
| (share+"zsh/helpfiles").install Dir["*"] | |
| end | |
| end | |
| def patches | |
| DATA | |
| end | |
| def test | |
| system "#{bin}/zsh", "--version" | |
| end | |
| def caveats; <<-EOS.undent | |
| To use this build of Zsh as your login shell, add it to /etc/shells. | |
| If you have administrator privileges, you must fix an Apple miss | |
| configuration in Mac OS X 10.7 Lion by renaming /etc/zshenv to | |
| /etc/zprofile, or Zsh will have the wrong PATH when executed | |
| non-interactively by scripts. | |
| Alternatively, install Zsh with /etc disabled: | |
| brew install --disable-etcdir zsh | |
| Add the following to your zshrc to access the online help: | |
| unalias run-help | |
| autoload run-help | |
| HELPDIR=#{HOMEBREW_PREFIX}/share/zsh/helpfiles | |
| EOS | |
| end | |
| end | |
| __END__ | |
| diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c | |
| index 17b78ce..f136178 100644 | |
| --- a/Src/Zle/zle_refresh.c | |
| +++ b/Src/Zle/zle_refresh.c | |
| @@ -1576,7 +1576,7 @@ zrefresh(void) | |
| else | |
| put_rpmpt = rprompth == 1 && rpromptbuf[0] && | |
| !strchr(rpromptbuf, '\t') && | |
| - (int)ZR_strlen(nbuf[0]) + rpromptw < winw - 1; | |
| + (int)ZR_strlen(nbuf[0]) + rpromptw < winw; | |
| } else { | |
| /* insert >.... on first line if there is more text before start of screen */ | |
| ZR_memset(nbuf[0], zr_sp, lpromptw); | |
| @@ -1631,9 +1631,9 @@ zrefresh(void) | |
| if (put_rpmpt && !iln && !oput_rpmpt) { | |
| int attrchange; | |
| - moveto(0, winw - 1 - rpromptw); | |
| + moveto(0, winw - rpromptw); | |
| zputs(rpromptbuf, shout); | |
| - vcs = winw - 1; | |
| + vcs = winw; | |
| /* reset character attributes to that set by the main prompt */ | |
| txtchange = pmpt_attr; | |
| /* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment