Created
September 2, 2015 22:40
-
-
Save jmervine/1890befd38ad32c420c0 to your computer and use it in GitHub Desktop.
tmate helper wrapper
This file contains 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
# tmate | |
function tmate { | |
local _sock=/tmp/tmate.sock | |
local _tmate=/usr/local/bin/tmate | |
if [ -z "$@" ]; then | |
$_tmate -S $_sock | |
else | |
case $@ in | |
p|print|ssh|url) | |
$_tmate -S $_sock display -p '#{tmate_ssh}';; | |
ro|printro|sshro|rourl|urlro|rossh) | |
$_tmate -S $_sock display -p '#{tmate_ssh_ro}';; | |
*) | |
$_tmate $@ | |
esac | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment