i2cssh 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/i2cssh +4 -3
- data/i2cssh.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/bin/i2cssh
CHANGED
@@ -16,6 +16,7 @@ optparse = OptionParser.new do |opts|
|
|
16
16
|
opts.on('-c', '--cluster CLUSTERNAME', "Name of the cluster specified in ~/.i2csshrc") { |c| options[:cluster] = c }
|
17
17
|
opts.on('-C', '--columns COLUMNS', "Amount of columns (rows will be calculated)") { |c| options[:columns] = c }
|
18
18
|
opts.on('-R', '--rows ROWS', "Amount of rows (columns will be calculated)") { |r| options[:rows] = r }
|
19
|
+
opts.on('-s', '--session SESSIONNAME', "Name of an iTerm2 session") { |s| options[:session_name] = s }
|
19
20
|
end
|
20
21
|
|
21
22
|
optparse.parse!
|
@@ -64,8 +65,8 @@ end
|
|
64
65
|
iterm = Appscript.app.by_name('iTerm')
|
65
66
|
finder = Appscript.app.by_name('Finder')
|
66
67
|
sys_events = Appscript.app.by_name('System Events')
|
67
|
-
|
68
68
|
term = iterm.make(:new => :terminal)
|
69
|
+
|
69
70
|
session = term.sessions.after.make(:new => :session)
|
70
71
|
session.exec(:command => "/bin/bash -l")
|
71
72
|
|
@@ -90,10 +91,10 @@ end
|
|
90
91
|
|
91
92
|
(rows * columns).times do |i|
|
92
93
|
if servers && servers[i] then
|
93
|
-
term.sessions[i+1].write(:text => "#{ssh_prefix}#{servers[i]}")
|
94
|
+
term.sessions[i+1].write(:text => "history -d $(($HISTCMD-1)) && #{ssh_prefix}#{servers[i]}")
|
94
95
|
else
|
95
96
|
term.sessions[i+1].foreground_color.set("red")
|
96
|
-
term.sessions[i+1].write(:text => "echo -e '#{"\n"*100}UNUSED'")
|
97
|
+
term.sessions[i+1].write(:text => "history -d $(($HISTCMD-1)) && echo -e '#{"\n"*100}UNUSED'")
|
97
98
|
end
|
98
99
|
end
|
99
100
|
if options[:debug] then
|
data/i2cssh.gemspec
CHANGED
metadata
CHANGED