terminal_multiplexer 0.0.1 → 0.1.0
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/Gemfile
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module Terminal
|
2
2
|
class Session
|
3
3
|
attr_reader :name, :command
|
4
|
-
attr_accessor :active_window
|
5
4
|
|
6
5
|
def initialize(name = 'default', command = 'zsh')
|
7
6
|
|
@@ -14,6 +13,10 @@ module Terminal
|
|
14
13
|
@active_window = 1
|
15
14
|
end
|
16
15
|
|
16
|
+
def active_window(num)
|
17
|
+
@active_window=num
|
18
|
+
end
|
19
|
+
|
17
20
|
def plain
|
18
21
|
w_defs ||= build_window_string
|
19
22
|
w_opts ||= build_window_options
|
@@ -36,7 +39,7 @@ module Terminal
|
|
36
39
|
w_str += @windows.collect{|w| w.plain}.join(' ')
|
37
40
|
end
|
38
41
|
|
39
|
-
w_str += " select-window -t:+#{active_window}\\;"
|
42
|
+
w_str += " select-window -t:+#{@active_window}\\;"
|
40
43
|
|
41
44
|
end
|
42
45
|
|
@@ -37,12 +37,12 @@ module Terminal
|
|
37
37
|
|
38
38
|
it "creates a new window for the default session" do
|
39
39
|
multi.new_window
|
40
|
-
multi.send(:build_multiplexer_command_string).should == "new-session -n default zsh\\; new-window -n tab zsh\\;"
|
40
|
+
multi.send(:build_multiplexer_command_string).should == "new-session -n default zsh\\; new-window -n tab zsh\\; select-window -t:+1\\;"
|
41
41
|
end
|
42
42
|
it "creates two session one with and one without a window if the session name doesn't match " do
|
43
43
|
multi.new_session('session1','ksh')
|
44
44
|
multi.new_window
|
45
|
-
multi.send(:build_multiplexer_command_string).should == "new-session -n session1 ksh\\; new-session -n default zsh\\; new-window -n tab zsh\\; select-window -t:+1\\;"
|
45
|
+
multi.send(:build_multiplexer_command_string).should == "new-session -n session1 ksh\\; select-window -t:+1\\; new-session -n default zsh\\; new-window -n tab zsh\\; select-window -t:+1\\;"
|
46
46
|
end
|
47
47
|
|
48
48
|
it "creates two session one with and one without a window if the session name doesn't match " do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal_multiplexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-04 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: highline
|
16
|
-
requirement: &
|
16
|
+
requirement: &11158060 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *11158060
|
25
25
|
description:
|
26
26
|
email:
|
27
27
|
- dev@fedux.org
|