Skip to content

Instantly share code, notes, and snippets.

@natlownes
Created February 13, 2013 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natlownes/4949384 to your computer and use it in GitHub Desktop.
Save natlownes/4949384 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
command_exists () {
type "$1" &> /dev/null ;
}
system_name="`uname -s`"
if [ "$system_name" == "Darwin" ]
then
if command_exists reattach-to-user-namespace
then
reattach-to-user-namespace -l $SHELL ~/.tmux/tmux_clipboard.sh &
reattach-to-user-namespace -l "$SHELL"
else
echo "reattach-to-user-namespace not found \
$system_name clipboard will not work \
you can: brew install reattach-to-user-namespace"
$SHELL
fi
else
$SHELL
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment