Created
September 26, 2010 16:05
-
-
Save msmorgan/598056 to your computer and use it in GitHub Desktop.
My settings for the Bourne shell.
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
#!/bin/sh | |
####### | |
# 2010 Michael Morgan | |
# | |
# .profile | |
# Startup script for sh. | |
# | |
# I aim to keep the instructions in this file is compatible with the | |
# original Bourne shell. | |
# When using this with bash (you probably are), it may be necessary to add the | |
# line ``source $HOME/.profile'' to ~/.bashrc. | |
##### | |
#### | |
# Convenience functions. | |
## | |
# Opens the specified man pages in OS X's Preview for easy reading or printing. | |
gentleman() { | |
man -t "$@" | open -f -a Preview | |
} | |
# So not all of my convenience scripts load at once, I keep them in separate, | |
# project-specific files in ~/.helpers. | |
# To load helpers for a project, call helpers <project>. | |
helpers() { | |
helpdir=$HOME/.helpers | |
for project in "$@"; do | |
source "$helpdir/$project" | |
done | |
} | |
#### | |
# Exports for TextMate. | |
## | |
export EDITOR='mate -w' | |
export GIT_EDITOR='mate -wl1' | |
export TEXEDIT='mate -w -l %d "%s"' | |
export LESSEDIT='mate -l %lm %f' | |
#### | |
# Exports for Homebrew software. | |
## | |
cellar=$( brew --cellar ) | |
# Exports for Google's Go programming language. Irritating but necessary. | |
export GOROOT=$cellar/go/HEAD | |
export GOBIN=/usr/local/bin | |
export GOARCH=amd64 | |
export GOOS=darwin | |
# Exports for cabal from the Haskell Platform. Cabal installs packages into a | |
# hidden folder in the home directory for some reason. | |
export PATH=$PATH:$HOME/.cabal/bin | |
# Exports for SMLNJ. SMLNJ is installed by Homebrew as keg-only (meaning it | |
# does not link the files into /usr/local). | |
export PATH=$PATH:$cellar/smlnj/110.72 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment