Permalink
Browse files

screen sessions added

  • Loading branch information...
1 parent 599a96e commit cf8a371db4a6fbf47ff7cd1716ea4674fd346fc2 @c3w committed May 11, 2012
Showing with 12 additions and 4 deletions.
  1. +6 −1 README
  2. +4 −2 ash
  3. +2 −1 ashrc-dist
View
@@ -1,6 +1,11 @@
-'Ash' v0.1
+'Ash' v0.2
http://github.com/c3w/ash
+2012MAY10 c3w
+
+added 'screen' option in the ashrc json
+ . great for wonky networks and ssh tunnels
+
2011OCT25 c3w
TAB host auto-complete added!
View
@@ -31,16 +31,18 @@ stuff.each do|k,v|
$tunnel_port = "-p #{value} "
when "tunnel_user"
$tunnel_user = "-l #{value} "
+ when "screen"
+ $screen = "screen -R #{value} "
end
end
cmd = "echo 'tell app \"Terminal\" to set current settings of first window to settings set \"#{$type}\"' | osascript"
system(cmd)
if $tunnel != ""
- cmd = "ssh -A #{$tunnel} #{$tunnel_user} #{$tunnel_port} \"ssh #{$port} -t #{$fqdn} #{$user}\""
+ cmd = "ssh -A #{$tunnel} #{$tunnel_user} #{$tunnel_port} \"#{$screen} ssh #{$port} -t #{$fqdn} #{$user}\""
else
- cmd = "ssh -A #{$port} #{$user} #{$fqdn}"
+ cmd = "ssh -A #{$port} #{$user} #{$fqdn} -t #{$screen}"
end
system(cmd)
end
View
@@ -13,6 +13,7 @@
"user": "myuser",
"tunnel": "www.something.com",
"tunnel_user": "root",
- "tunnel_port": "22"
+ "tunnel_port": "22",
+ "screen": "myscreen"
}
}

0 comments on commit cf8a371

Please sign in to comment.