Skip to content

Instantly share code, notes, and snippets.

@alexcabrera
Created February 23, 2015 03:13
Show Gist options
  • Save alexcabrera/71d1e04d4364747369a7 to your computer and use it in GitHub Desktop.
Save alexcabrera/71d1e04d4364747369a7 to your computer and use it in GitHub Desktop.
Your `~/.bash_helpers` and `~/.bash_profile` files should include the following lines; add the `.termconfig` file to directories you'd like to configure.
# Name iTerm2 tabs
function nametab {
echo -ne "\033]0;"$*"\007";
}
# Load bash_helper commands
source $HOME/.bash_helpers
# Check for .termconfig file when changing directories
function cd {
builtin cd "$1"
if [ -f ./.termconfig ]; then
source ./.termconfig
fi
}
#!/usr/bin/env bash
# The following script will be run when you change into this directory
nametab <project name>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment