i2c2 0.99.0 → 0.99.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01bf03ba44e3c2eb7eb06a573d0c92d09519850ddccbdca376f8ba034b6aca2d
4
- data.tar.gz: ac6c004c03542c1ef81d38be6646a4fa5514d8743ef4317ba16cc1d8f53483cc
3
+ metadata.gz: f13afc38b2e91e58586e6be04bc1906683d41baa984166299e659b6d69567e47
4
+ data.tar.gz: 1ad8d8c3ad2eb4bdff7dec18b41daadd6afd05bc423007443669b8e497e3eed1
5
5
  SHA512:
6
- metadata.gz: ac3bb801c2213fd33273e7152743ad40d46f8db4d6b75f88663191c56f077380c53a982032581cfbea1a4f89a6c59098fbbf9007e6e7aabe57c59dde1af4d83e
7
- data.tar.gz: cc5adb3e867601ba620a66f8f787bbdb7a084d344c5637c15d51a253b2812c26f67d9fe54901ad8734146b2ed3af2507e649a97296e636167429354649569b78
6
+ metadata.gz: 41cd0d50568e399bd8cdbade3f4c05343f353d4f6784992245b5e2fcb06100493e2c649eff638f6e422a5058af03d6aed5dc5fa8915d130aa9def5c99f1dcf41
7
+ data.tar.gz: addf4f3009e31f8d07d663cd45d57f177450f2f727a1faf1de74e456408d3f0be41a9f01458ef78ef004646b0aaf4e242661a6f6352af56a995ebf2473e6ea53
data/README.md CHANGED
@@ -6,21 +6,23 @@ a master window for input, i2c2 uses iterm2 split panes and "Send input to all s
6
6
  i2c2 is based on i2cssh which was a great project created by Wouter de Bie but unfortunately i2cssh had its latest release on July 15, 2016, almost 3 years ago.
7
7
  i2c2 is here just to keep i2cssh alive and up to date.
8
8
 
9
- ## Installing
9
+ ## Install
10
10
 
11
- When using iTerm2 < 2.9, install old i2cssh version 1.16.0:
11
+ Just run:
12
12
 
13
- $ gem install i2cssh -v 1.16.0
13
+ $ gem install i2c2
14
14
 
15
- Otherwise, just run:
15
+ When using iTerm2 < 2.9, install old i2cssh version 1.16.0:
16
16
 
17
- $ gem install i2c2
17
+ $ gem install i2cssh -v 1.16.0
18
18
 
19
19
  ## Migrate from i2cssh
20
20
 
21
21
  If you have used i2cssh and want to migrate, you can do it painless using i2c2 version 0.99.0 which is 100% compatible with i2cssh 2.2.0 (latest version),
22
22
  including the config file ~/.i2csshrc.
23
23
 
24
+ Version 0.99.1 is compatible with i2cssh branch master at the time of fork (commit: ac0bf90), including auto complete config file name i2cssh-autocomplete.bash.
25
+
24
26
  ## Usage
25
27
  Usage: i2c2 [options] [(username@host [username@host] | username@cluster)]
26
28
  -c, --clusters clus1,clus2 Comma-separated list of clusters specified in ~/.i2csshrc
@@ -77,7 +79,15 @@ The `i2csshrc` file is a YAML formatted file that contains the following structu
77
79
  - host1
78
80
  - host2
79
81
 
80
- Optional parameters can be used globally or per cluster and include:
82
+ ## Autocomplete
83
+
84
+ To allow autocomplete, add the following to your .bash_profile, .bashrc or .profile
85
+
86
+ $ source [path to ./extras/i2cssh-autocomplete.bash]
87
+
88
+ ## Optional Parameters
89
+
90
+ They can be used globally or per cluster and include:
81
91
 
82
92
  broadcast: (true/false) # Enable/disable broadcast on start
83
93
  login: <username> # Use this username for login
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.99.0
1
+ 0.99.1
data/bin/i2c2 CHANGED
@@ -46,7 +46,7 @@ def set_options(config_hash, login_override=nil)
46
46
  @i2_options << @i2_options.first.clone
47
47
  end
48
48
 
49
- [:broadcast, :profile, :rank, :iterm2, :login, :columns, :rows, :sleep, :direction, :itermname].each do |p|
49
+ [:broadcast, :profile, :rank, :iterm2, :login, :columns, :rows, :sleep, :shell, :direction, :itermname].each do |p|
50
50
  @i2_options.last[p] = config_hash[p.to_s].nil? ? @i2_options.last[p] : config_hash[p.to_s]
51
51
  end
52
52
 
@@ -206,6 +206,10 @@ optparse = OptionParser.new do |opts|
206
206
  'Number of seconds to sleep between creating SSH sessions' do |s|
207
207
  opts_from_cmdline[:sleep] = s
208
208
  end
209
+ opts.on '-S', '--shell SHELL', String,
210
+ 'Shell to use when spawning the SSH sessions' do |s|
211
+ opts_from_cmdline[:shell] = s
212
+ end
209
213
  opts.on "-d", '--direction DIRECTION', String,
210
214
  'Direction that new sessions are created (default: column)' do |d|
211
215
  unless ["row", "column"].include?(d)
@@ -0,0 +1,17 @@
1
+ ###
2
+ # autocomplete for i2c2
3
+ # To allow autocomplete, add the following
4
+ # to your .bash_profile, .bashrc or .profile
5
+ # source [path to i2cssh-autocomplete.bash]
6
+ #
7
+
8
+ _complete_i2cssh_hosts () {
9
+ COMPREPLY=()
10
+ cur="${COMP_WORDS[COMP_CWORD]}"
11
+ cmd="f=File.expand_path('~/.i2csshrc'); hash = YAML.load(File.read(f)); puts hash['clusters'].keys;";
12
+ host_list=$(ruby -r yaml <<< $cmd);
13
+ COMPREPLY=( $(compgen -W "${host_list}" -- $cur))
14
+ return 0
15
+ }
16
+
17
+ complete -F _complete_i2cssh_hosts i2c2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "i2c2"
8
- s.version = "0.99.0"
8
+ s.version = "0.99.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["dx7", "Wouter de Bie"]
12
- s.date = "2016-07-15"
12
+ s.date = "2019-05-11"
13
13
  s.description = "csshX like cluster ssh using iTerm2 panes"
14
14
  s.email = "dx7@pm.me"
15
15
  s.executables = ["i2c2"]
@@ -16,7 +16,7 @@ class I2c2
16
16
  @shell_menu = @sys_events.processes["iTerm2"].menu_bars[1].menu_bar_items["Shell"].menus["Shell"]
17
17
 
18
18
  @profile = i2_options.first[:profile] || "Default"
19
- @shell = "/usr/bin/env bash"
19
+ @shell = "/usr/bin/env #{@i2_options.first[:shell] || 'bash'}"
20
20
 
21
21
  @iterm.create_window_with_profile(@profile, :command => "#{@shell} -l")
22
22
  @window = @iterm.current_window
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i2c2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.0
4
+ version: 0.99.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dx7
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-10 00:00:00.000000000 Z
12
+ date: 2019-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -98,6 +98,7 @@ files:
98
98
  - Rakefile
99
99
  - VERSION
100
100
  - bin/i2c2
101
+ - extras/i2cssh-autocomplete.bash
101
102
  - i2c2.gemspec
102
103
  - lib/i2c2.rb
103
104
  - test/helper.rb