utils 0.0.76 → 0.0.77
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/utils/editor.rb +9 -1
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a685e5113f973b6f044465d5535dfc1b3db973f
|
|
4
|
+
data.tar.gz: 8d4ef8c6eb7cd1d8aabb937a7868b343858f80e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: faa4c6848850fe2013f5e4671efb653edf8806771b8e0db2121e51cfa1bb318b43c90b66e6c934b054996e5f6d837b1a3d1bd723c5b315e8a2178eefe8f0f431
|
|
7
|
+
data.tar.gz: 419d806822b4c2dd30aa088ed96a94b78e20a47170343671bb4306497a871a42c59a899affe293a3c5db1ab177929881cf9e7ba98eaec4db5dbc173be7818e9c
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.77
|
data/lib/utils/editor.rb
CHANGED
|
@@ -115,6 +115,7 @@ module Utils
|
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
def edit(*filenames)
|
|
118
|
+
ensure_running
|
|
118
119
|
if filenames.size == 1 and
|
|
119
120
|
source_location = filenames.first.source_location
|
|
120
121
|
then
|
|
@@ -171,7 +172,14 @@ module Utils
|
|
|
171
172
|
sleep pause_duration
|
|
172
173
|
edit_remote_send('<ESC>:bw<CR>')
|
|
173
174
|
else
|
|
174
|
-
|
|
175
|
+
switch_to_index =
|
|
176
|
+
`tmux list-panes -F '\#{pane_pid} \#{pane_index}'`.lines.find { |l|
|
|
177
|
+
pid, index = l.split(' ')
|
|
178
|
+
if `ps -eo ppid,command|grep ^#{pid}` =~ %r(/edit )
|
|
179
|
+
break index.to_i
|
|
180
|
+
end
|
|
181
|
+
}
|
|
182
|
+
switch_to_index and system "tmux select-pane -t #{switch_to_index}"
|
|
175
183
|
end
|
|
176
184
|
end
|
|
177
185
|
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "utils"
|
|
5
|
-
s.version = "0.0.
|
|
5
|
+
s.version = "0.0.77"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Florian Frank"]
|
|
9
|
-
s.date = "2013-05-
|
|
9
|
+
s.date = "2013-05-14"
|
|
10
10
|
s.description = "This ruby gem provides some useful command line utilities"
|
|
11
11
|
s.email = "flori@ping.de"
|
|
12
12
|
s.executables = ["chroot-exec", "chroot-libs", "classify", "create_tags", "discover", "edit", "edit_wait", "enum", "errf", "git-empty", "irb_connect", "myex", "number_files", "on_change", "path", "probe", "remote_copy", "same_files", "search", "sedit", "ssh-tunnel", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "utils-utilsrc", "vacuum_firefox_sqlite", "xmp"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.77
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-05-
|
|
11
|
+
date: 2013-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gem_hadar
|