Homebrew fatal: needed a single revision (MacOs Sierra)

I had the same problem after upgrading to Sierra. In addition to brew –prefix, which displays Homebrew’s install path, there’s also brew –repository, which displays where it’s .git directory is located. man brew says that claims that “for standard installs, the prefix and repository are the same directory”. Either the man page is out of … Read more

Why don’t git colors show up in iTerm2

You should check that iTerm is setting the TERM variable correctly. On my system, I see: echo $TERM xterm-256color And have working colours in git. This is set according to the ‘Report Terminal Type’ property in iTerm’s preferences. You should also check the Colors tab, and ensure the contrast slider isn’t all the way to … Read more

How can I get mouse selection to work in emacs and iTerm2 on Mac?

For Emacs in iTerm 2, I’ve found that the following bit in my ~/.emacs file works very well, providing the ability to insert the character at an arbitrary location, mark a region, and use the scroll wheel: ;; Enable mouse support (unless window-system (require ‘mouse) (xterm-mouse-mode t) (global-set-key [mouse-4] (lambda () (interactive) (scroll-down 1))) (global-set-key … Read more

iTerm 2 profiles

iTerm2 supports a custom escape code that changes the profile on the fly. Put it in your .bashrc or .bash_profile. <esc>]50;SetProfile=X^G where X is the profile. For instance, to change the profile to one called “Foo”, us this shell script: #!/bin/bash echo -e “\033]50;SetProfile=Foo\a” To change it back when you log out, put code to … Read more