terminitor 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,8 @@ module Terminitor
53
53
  # clean up prompt
54
54
  tab_content[:commands].insert(0, 'clear') if tab_name || !@working_dir.to_s.empty?
55
55
  # add title to tab
56
- tab_content[:commands].insert(0, "PS1=\"$PS1\\e]2;#{tab_name}\\a\"") if tab_name
56
+ # we use \[ and \] here so that the title characters do not get included in the command history
57
+ tab_content[:commands].insert(0, "PS1=\"$PS1\\[\\e]2;#{tab_name}\\a\\]\"") if tab_name
57
58
  tab_content[:commands].insert(0, "cd \"#{@working_dir}\"") unless @working_dir.to_s.empty?
58
59
  tab_content[:commands].each { |cmd| execute_command(cmd, :in => tab) }
59
60
  end
@@ -120,7 +120,7 @@ module Terminitor
120
120
  # clean up prompt
121
121
  tab_content[:commands].insert(0, 'clear') if tab_name || !@working_dir.to_s.empty?
122
122
  # add title to tab
123
- tab_content[:commands].insert(0, "PS1=$PS1\"\\e]2;#{tab_name}\\a\"") if tab_name
123
+ tab_content[:commands].insert(0, "PS1=\"$PS1\\[\\e]2;#{tab_name}\\a\\]\"") if tab_name
124
124
  tab_content[:commands].insert(0, "cd \"#{@working_dir}\"") unless @working_dir.to_s.empty?
125
125
  # if tab_content hash has a key :panes we know this tab should be split
126
126
  # we can execute tab commands if there is no key :panes
@@ -186,20 +186,18 @@ module Terminitor
186
186
  terminal_process.menu_bars.first
187
187
  end
188
188
 
189
- def call_ui_action(menu, submenu = nil, action)
189
+ def call_ui_action(menu, submenu, action)
190
190
  menu = iterm_menu.menu_bar_items[menu].menus[menu]
191
- if submenu
192
- menu = menu.menu_items[submenu].menus[submenu]
193
- end
191
+ menu = menu.menu_items[submenu].menus[submenu] if submenu
194
192
  menu.menu_items[action].click
195
193
  end
196
194
 
197
195
  def split_v
198
- call_ui_action("Shell", nil, "Split vertically")
196
+ call_ui_action("Shell", nil, "Split Vertically With Same Profile")
199
197
  end
200
198
 
201
199
  def split_h
202
- call_ui_action("Shell", nil, "Split horizontally")
200
+ call_ui_action("Shell", nil, "Split Horizontally With Same Profile")
203
201
  end
204
202
 
205
203
  # to select panes; iTerm's Appscript select method does not work
@@ -118,9 +118,9 @@ module Terminitor
118
118
  # @example return_error_message 'hi
119
119
  def return_error_message(project)
120
120
  unless project.empty?
121
- say "'#{project}' doesn't exist! Please run 'terminitor open #{project.gsub(/\..*/,'')}'"
121
+ say "'#{project}' doesn't exist! Please run 'terminitor edit #{project.gsub(/\..*/,'')}'"
122
122
  else
123
- say "Termfile doesn't exist! Please run 'terminitor open' in project directory"
123
+ say "Termfile doesn't exist! Please run 'terminitor edit' in project directory"
124
124
  end
125
125
  end
126
126
 
@@ -1,3 +1,3 @@
1
1
  module Terminitor
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -123,11 +123,11 @@ context "AbstractCore" do
123
123
  mock(core).open_window(:bounds => [10,10], :settings => 'cool', :name => "first tab") { "first" }
124
124
  mock(core).open_tab(:settings => 'grass', :name => 'second tab') { "second" }
125
125
  mock(core).set_delayed_options { true }
126
- mock(core).execute_command('PS1="$PS1\e]2;first tab\a"', :in => 'first')
126
+ mock(core).execute_command('PS1="$PS1\[\e]2;first tab\a\]"', :in => 'first')
127
127
  mock(core).execute_command('clear', :in => 'first')
128
128
  mock(core).execute_command('ls', :in => "first")
129
129
  mock(core).execute_command('ok', :in => "first")
130
- mock(core).execute_command('PS1="$PS1\e]2;second tab\a"', :in => 'second')
130
+ mock(core).execute_command('PS1="$PS1\[\e]2;second tab\a\]"', :in => 'second')
131
131
  mock(core).execute_command('clear', :in => 'second')
132
132
  mock(core).execute_command('ps', :in => "second")
133
133
  core.process!
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminitor
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 5
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 6
8
- - 0
9
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Arthur Chiu
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-05-15 00:00:00 -07:00
19
+ date: 2011-09-13 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -26,6 +27,7 @@ dependencies:
26
27
  requirements:
27
28
  - - ~>
28
29
  - !ruby/object:Gem::Version
30
+ hash: 5
29
31
  segments:
30
32
  - 0
31
33
  - 6
@@ -41,6 +43,7 @@ dependencies:
41
43
  requirements:
42
44
  - - ~>
43
45
  - !ruby/object:Gem::Version
46
+ hash: 39
44
47
  segments:
45
48
  - 0
46
49
  - 14
@@ -56,6 +59,7 @@ dependencies:
56
59
  requirements:
57
60
  - - ~>
58
61
  - !ruby/object:Gem::Version
62
+ hash: 3
59
63
  segments:
60
64
  - 0
61
65
  - 6
@@ -71,6 +75,7 @@ dependencies:
71
75
  requirements:
72
76
  - - ~>
73
77
  - !ruby/object:Gem::Version
78
+ hash: 23
74
79
  segments:
75
80
  - 1
76
81
  - 0
@@ -86,6 +91,7 @@ dependencies:
86
91
  requirements:
87
92
  - - ~>
88
93
  - !ruby/object:Gem::Version
94
+ hash: 41
89
95
  segments:
90
96
  - 0
91
97
  - 12
@@ -101,6 +107,7 @@ dependencies:
101
107
  requirements:
102
108
  - - ~>
103
109
  - !ruby/object:Gem::Version
110
+ hash: 23
104
111
  segments:
105
112
  - 1
106
113
  - 0
@@ -116,6 +123,7 @@ dependencies:
116
123
  requirements:
117
124
  - - ">="
118
125
  - !ruby/object:Gem::Version
126
+ hash: 3
119
127
  segments:
120
128
  - 0
121
129
  version: "0"
@@ -196,6 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
204
  requirements:
197
205
  - - ">="
198
206
  - !ruby/object:Gem::Version
207
+ hash: 3
199
208
  segments:
200
209
  - 0
201
210
  version: "0"
@@ -204,6 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
213
  requirements:
205
214
  - - ">="
206
215
  - !ruby/object:Gem::Version
216
+ hash: 23
207
217
  segments:
208
218
  - 1
209
219
  - 3
@@ -212,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
222
  requirements: []
213
223
 
214
224
  rubyforge_project: terminitor
215
- rubygems_version: 1.3.7
225
+ rubygems_version: 1.6.2
216
226
  signing_key:
217
227
  specification_version: 3
218
228
  summary: Automate your development workflow