Cleaner port-forward, 80 char warn in vim

This commit is contained in:
Andrew Tomaka 2013-11-05 17:42:45 -05:00
parent f96b40dbfa
commit 8a68ee3183
3 changed files with 17 additions and 9 deletions

View file

@ -13,7 +13,11 @@ insert-sudo() {
}
function port-forward {
ssh $1 -R $2":localhost:"$2 -g
if [ $# -lt 2 ]; then
echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\]
else
ssh $1 -R ${3:-$2}":localhost:"$2 -g
fi
}
function map-sshfs {