i2cssh 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/i2cssh +4 -3
  3. data/i2cssh.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{i2cssh}
8
- s.version = "0.0.6"
8
+ s.version = "0.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wouter de Bie"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i2cssh
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wouter de Bie