Git on Red Hat Enterprise Linux (RHEL) 4 i386

I have been struggling with this for a while now. There is no yum to begin with and up2date doesn’t help much either (no git-* packages). Here is a quick solution:

$ cd ~
$ wget
$ wget
$ rpm -ivh --nodeps git-1.7.3-1.el4.rf.i386.rpm perl-Git-1.7.3-1.el4.rf.i386.rpm
$ git --version

You can browse for the latest packages and update the above accordingly.

MinTTY at your fingertips

How often do you need to get in and out of your terminal as quickly as possible? I use Cygwin for Linux emulation under Windows and MinTTY as my terminal of choice. MinTTY is great as it supports semi-transparent backgrounds and fullscreen mode (and lots more, be sure to check out the homepage). It is so tiny I don’t mind having a copy of it running at all times, however it bugs me when I see its icon on the taskbar. The following is an AutoHotkey script which launches a new MinTTY window, if one is not started already, sets it up in fullscreen mode and lets you do your work until you press Win+C again to send it to the background and remove all traces of it on your desktop.

If you haven’t used AutoHotkey before make sure you download a copy. You most definitely will find some use for it.

As for the script, it is possible to tweak it so the window is only taking half the screen and slides in from the top (ah, Mac envy). I leave that for you to figure out.

cd with bookmarks and auto-completion for Zsh

If you are like me, you do a lot of terminal work and cd is your friend (or enemy). I was getting really tired to cd /home/stan/projects/important-project/src/ every time I launch my shell. It’s bad enough when you have one project to work on, but as things get scattered, you tend to do more directory traversing than actual coding.

Up until recently I was using go-tool. From the website:

go is a small shell command for changing directories quickly. Typically you have a set of directories that you work in. Typing out the names of those dirs in full can be tedious. go allows you to give a shortcut name for a directory – say ko for D:\trentm\main\Apps\Komodo-devel [..]

It’s a great tool, but it doesn’t work with Zsh out-of-the box (trivial to modify the Bash example to fake it). It’s also based on Python and can be very slow when using it in a fresh terminal window. I really needed a solution that was native and didn’t require a lot of effort to set up.

The ‘Thin’ Option

I stumbled upon Ivan Čukić’s excellent blog post. It’s so cool, I couldn’t resist trying it. I took the functions and tweaked the path where the database is stored and how it is accessed. This is a better solution compared to go and as a bonus it also offers auto-completion:

How to Use It

Paste the above code at the bottom of your ~/.zshrc file. Restart your terminal and run cdb_edit. This should bring up an empty buffer in your $EDITOR. To define shortcuts, use shortcut absolute/path. Here is an example file:

$ cdb_edit

public    /cygdrive/d/Workspace/public/
projects  /cygdrive/d/Workspace/projects/

Try it Out

Using the database above as an example:

~ $ cdb public
/cygdrive/d/Workspace/public/ $ 

The ‘Fat’ Option

If you are looking for something more sophisticated which wouldn’t involve maintaining a database using vim then you need Jump, a bookmarking system for the bash and zsh shells. It’s a great tool and quite easy to install too:

$ gem install jump
$ cp `gem contents jump | grep zsh` ~/.jump_shell_driver

and a line in your ~/.zshrc to make the magic happen: source ~/.jump_shell_driver.

Further instructions (incl. Bash) and a tutorial is available on the project’s GitHub page.

Alternative Cygwin terminal & shell

I just realised many, if not most, Cygwin users stick with their default terminal which is the Cygwin Bash Shell. I never understood why this is the default with each installation. It is no better than Command Prompt – horizontal window resizing is out of the question, custom fonts are limited and mouse support is, well… missing.


If you have used PuTTY to connect to remote machines, you would love MinTTY. It is based on code from PuTTY 0.60. Features as seen on the project’s homepage include:

  • Native Windows user interface that tries to keep things simple.
  • Support for UTF-8, CJK fonts, and Windows IMEs.
  • Drag & drop and copy & paste of text, files and folders. (Files and folders are inserted as quoted filenames.)
  • Extensive mouse support, e.g. mousewheel scrolling in less and opening files and URLs with Ctrl+click
  • Window transparency, including glass effect on Vista and 7.
  • Small program size and uick scrolling.

MinTTY preview


I encourage you to try Zsh as an alternative to Bash (the default). Bash is fine, but if you are looking for better history management, lots of plug-ins and options for customisations you need to move on. Check out oh-my-zsh for a collection of such add-ons.

You can install MinTTY and ZSH using Cygwin’s setup.exe.

MinTTY at your fingertips

Having a terminal keystroke away is essential in my day-to-day work. I need to be able to quickly get in and out of it – read how to do it.