The Daily Build

Icon

Software Development, version 3.0

Change directories faster with zsh

Something I didn’t know until recently: zsh does not require cd to change directories. Using the directory as a command implies “cd”. For example, instead of doing: me@server:/home/me $ cd /tmp me@server:/tmp $ You can just do: me@server:/home/me $ /tmp me@server:/tmp $ That’s three whole keystrokes (nearly half the command shown above), all day long.

Read the rest of this entry »

Making perl unit tests easier to run in emacs

It’s a hassle to have to switch from emacs to the shell, run unit tests, pick out the failure, switch back to emacs, navigate to the line, forget where you were supposed to go, switch back, etc etc. The whole process is much easier with compilation-perl.el. This handy bit of code sets up patterns for [...]

Read the rest of this entry »

Using Lenny to Build Jaunty Packages

<shameless_plug> I’m in the middle of putting together packages for the analog call generator my startup is building. </shameless_plug> The process for building debian packages is actually very well documented, though many of the tutorials you will find are aimed at people who are packaging third-party software instead of their own. Also, I’m running on [...]

Read the rest of this entry »

zsh history expansion

Exploring zsh features made me want to figure out some of the history-editing wizardry. (Bash has similar history tricks, I just never bothered to dive too deeply into them.) If you want to experiment with history expansion a bit, you can echo the result instead of executing it: hostname:~/dir% ls /some/long/path/to/file_0.1-2_i386.changes hostname:~/dir% echo !?ls?:s/-2/-3/ echo [...]

Read the rest of this entry »

Set Your zsh Prompt

Since the beginning of time, all the cool kids have had really cool shell prompts. It’s a great place to display helpful information, and zsh has features that let you have a flexible, informative, unobtrusive prompt.

Read the rest of this entry »

Make the zsh zle handle “words” correctly

Snippet from my .zshrc: # This controls what the line editor considers a word. By default it # includes ‘/’, which makes it so that when I M-del (attempting to erase # a directory in a path), I erase the whole path. Annoying. # WORDCHARS=’*?_-.[]~=/&;!#$%^(){}<>’ # (default) WORDCHARS=’*?_-.[]~=&;!#$%^(){}<>’ After living with this for a while, [...]

Read the rest of this entry »

Moving to zsh

To get started: sudo aptitude install zsh chsh /bin/zsh That’s pretty simple. Of course, you’re not running zsh yet… either logout and log back in or just run zsh at the prompt. You’ll get a series of prompts to configure a .zshrc. It only takes a few minutes, so run through the options and save [...]

Read the rest of this entry »

9 “Must-Have” Tools for Software Teams

The items below are useful systems based on my experience working with a bunch of different software teams at a handful of companies over the past decade-plus. I haven’t bothered to list things like compilers, interpreters, libraries, etc. If you don’t have those, you aren’t making software… Source control. This almost belongs in the “if [...]

Read the rest of this entry »

Use SSH to Forward Multiple Protocols to Multiple Machines

Let’s say you have a half-dozen machines at work you want to log into. Instead of setting up a remote forwarding connection from each of those machines, you can have the connection from your main machine perform multiple forwardings instead of just one. This even works if some of the machines don’t support ssh.

Read the rest of this entry »

Open an SSH Tunnel in Four Seconds or Less

As I mentioned in a previous post on ssh configuration, your config file can specify a variety settings for each server. In fact, the Hosts you use don’t even have to exist! Consider the following snippet in your ~/.ssh/config.

Read the rest of this entry »