utils 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/search +3 -2
- data/lib/utils/config/vimrc +8 -5
- data/lib/utils/grepper.rb +9 -1
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +5 -5
- metadata +27 -27
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.18
|
data/bin/search
CHANGED
@@ -6,10 +6,11 @@ include Utils
|
|
6
6
|
require 'spruz/go'
|
7
7
|
include Spruz::GO
|
8
8
|
|
9
|
-
def edit_files(pathes)
|
9
|
+
def edit_files(pattern, pathes)
|
10
10
|
editor = Utils::Editor.new do |config|
|
11
11
|
config.wait = true
|
12
12
|
end
|
13
|
+
editor.edit_remote_send("<ESC>/#{pattern}<CR>")
|
13
14
|
for path in pathes
|
14
15
|
STDERR.puts "Edit #{path}"
|
15
16
|
editor.edit(path)
|
@@ -60,6 +61,6 @@ grepper = Grepper.new(
|
|
60
61
|
:roots => roots
|
61
62
|
).search
|
62
63
|
case
|
63
|
-
when args['e'] then edit_files grepper.pathes
|
64
|
+
when args['e'] then edit_files pattern, grepper.pathes
|
64
65
|
when args['l'] then puts grepper.pathes
|
65
66
|
end
|
data/lib/utils/config/vimrc
CHANGED
@@ -63,7 +63,7 @@ if has("gui_running")
|
|
63
63
|
set guipty
|
64
64
|
colorscheme flori
|
65
65
|
hi Pmenu ctermbg=Grey guibg=DarkGrey
|
66
|
-
set guioptions-=
|
66
|
+
set guioptions-=rRlL
|
67
67
|
if exists("+guioptions")
|
68
68
|
set guioptions+=c
|
69
69
|
end
|
@@ -175,6 +175,7 @@ if has("fullscreen")
|
|
175
175
|
endif
|
176
176
|
endfunction
|
177
177
|
map <silent> <F11> :call Cfullscreen()<CR>
|
178
|
+
au GUIEnter * set fullscreen
|
178
179
|
endif
|
179
180
|
function! Ctoggle()
|
180
181
|
if &buftype == "quickfix"
|
@@ -371,34 +372,36 @@ endif
|
|
371
372
|
|
372
373
|
function! Cfind(...)
|
373
374
|
redraw
|
374
|
-
echo "Finding..."
|
375
375
|
if a:0 == 0
|
376
376
|
let args = [ expand( '<cword>') ]
|
377
377
|
else
|
378
378
|
let args = copy(a:000)
|
379
379
|
endif
|
380
|
+
let args_string = join(map(copy(args), 'shellescape(v:val)'), ' ')
|
381
|
+
echo 'Finding ' . args_string . '...'
|
380
382
|
set grepformat=%f
|
381
383
|
set grepprg=discover
|
382
384
|
set hlsearch
|
383
385
|
let @/=args[0]
|
384
|
-
silent exec "silent gr -a 'a-zA-Z0-9' -c -i " .
|
386
|
+
silent exec "silent gr -a 'a-zA-Z0-9' -c -i " . args_string
|
385
387
|
copen
|
386
388
|
redraw!
|
387
389
|
endfunction
|
388
390
|
|
389
391
|
function! Cgrep(...)
|
390
392
|
redraw
|
391
|
-
echo "Grepping..."
|
392
393
|
if a:0 == 0
|
393
394
|
let args = [ expand( '<cword>') ]
|
394
395
|
else
|
395
396
|
let args = copy(a:000)
|
396
397
|
endif
|
398
|
+
let args_string = join(map(args, 'shellescape(v:val)'), ' ')
|
399
|
+
echo 'Grepping ' . args_string . '...'
|
397
400
|
set grepformat=%f:%l
|
398
401
|
set grepprg=search
|
399
402
|
set hlsearch
|
400
403
|
let @/=args[0]
|
401
|
-
silent exec "silent gr -c -i " .
|
404
|
+
silent exec "silent gr -c -i " . args_string
|
402
405
|
copen
|
403
406
|
redraw!
|
404
407
|
endfunction
|
data/lib/utils/grepper.rb
CHANGED
@@ -150,7 +150,15 @@ class Utils::Grepper
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
end
|
153
|
-
@
|
153
|
+
if @args['L'] or @args['e']
|
154
|
+
@pathes = @pathes.sort_by do |path|
|
155
|
+
pair = path.split(':')
|
156
|
+
pair[1] = pair[1].to_i
|
157
|
+
pair
|
158
|
+
end
|
159
|
+
else
|
160
|
+
@pathes.sort!
|
161
|
+
end
|
154
162
|
self
|
155
163
|
end
|
156
164
|
end
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -2,20 +2,20 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{utils}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.18"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Florian Frank}]
|
9
|
-
s.date = %q{2011-08-
|
9
|
+
s.date = %q{2011-08-26}
|
10
10
|
s.description = %q{This ruby gem provides some useful command line utilities}
|
11
11
|
s.email = %q{flori@ping.de}
|
12
|
-
s.executables = [%q{
|
13
|
-
s.extra_rdoc_files = [%q{README.rdoc}, %q{lib/utils/
|
12
|
+
s.executables = [%q{chroot-exec}, %q{chroot-libs}, %q{classify}, %q{discover}, %q{edit}, %q{edit_wait}, %q{errf}, %q{git-empty}, %q{myex}, %q{number_files}, %q{path}, %q{probe}, %q{same_files}, %q{search}, %q{sedit}, %q{sshscreen}, %q{strip_spaces}, %q{unquarantine_apps}, %q{untest}, %q{utils-install-config}, %q{vacuum_firefox_sqlite}, %q{xmp}]
|
13
|
+
s.extra_rdoc_files = [%q{README.rdoc}, %q{lib/utils/config.rb}, %q{lib/utils/editor.rb}, %q{lib/utils/file_xt.rb}, %q{lib/utils/find.rb}, %q{lib/utils/finder.rb}, %q{lib/utils/grepper.rb}, %q{lib/utils/md5.rb}, %q{lib/utils/patterns.rb}, %q{lib/utils/version.rb}, %q{lib/utils.rb}]
|
14
14
|
s.files = [%q{.gitignore}, %q{.rvmrc}, %q{COPYING}, %q{Gemfile}, %q{README.rdoc}, %q{Rakefile}, %q{VERSION}, %q{bin/chroot-exec}, %q{bin/chroot-libs}, %q{bin/classify}, %q{bin/discover}, %q{bin/edit}, %q{bin/edit_wait}, %q{bin/errf}, %q{bin/git-empty}, %q{bin/myex}, %q{bin/number_files}, %q{bin/path}, %q{bin/probe}, %q{bin/same_files}, %q{bin/search}, %q{bin/sedit}, %q{bin/sshscreen}, %q{bin/strip_spaces}, %q{bin/unquarantine_apps}, %q{bin/untest}, %q{bin/utils-install-config}, %q{bin/vacuum_firefox_sqlite}, %q{bin/xmp}, %q{lib/utils.rb}, %q{lib/utils/config.rb}, %q{lib/utils/config/gdb/asm}, %q{lib/utils/config/gdb/ruby}, %q{lib/utils/config/gdbinit}, %q{lib/utils/config/irbrc}, %q{lib/utils/config/rdebugrc}, %q{lib/utils/config/screenrc}, %q{lib/utils/config/vim/autoload/Align.vim}, %q{lib/utils/config/vim/autoload/AlignMaps.vim}, %q{lib/utils/config/vim/autoload/rails.vim}, %q{lib/utils/config/vim/autoload/rubycomplete.vim}, %q{lib/utils/config/vim/autoload/sqlcomplete.vim}, %q{lib/utils/config/vim/autoload/vimball.vim}, %q{lib/utils/config/vim/colors/flori.vim}, %q{lib/utils/config/vim/compiler/eruby.vim}, %q{lib/utils/config/vim/compiler/ruby.vim}, %q{lib/utils/config/vim/compiler/rubyunit.vim}, %q{lib/utils/config/vim/ftdetect/ragel.vim}, %q{lib/utils/config/vim/ftdetect/ruby.vim}, %q{lib/utils/config/vim/ftplugin/eruby.vim}, %q{lib/utils/config/vim/ftplugin/ruby.vim}, %q{lib/utils/config/vim/ftplugin/xml.vim}, %q{lib/utils/config/vim/indent/IndentAnything_html.vim}, %q{lib/utils/config/vim/indent/eruby.vim}, %q{lib/utils/config/vim/indent/javascript.vim}, %q{lib/utils/config/vim/indent/ruby.vim}, %q{lib/utils/config/vim/plugin/AlignMapsPlugin.vim}, %q{lib/utils/config/vim/plugin/AlignPlugin.vim}, %q{lib/utils/config/vim/plugin/Decho.vim}, %q{lib/utils/config/vim/plugin/IndentAnything.vim}, %q{lib/utils/config/vim/plugin/bufexplorer.vim}, %q{lib/utils/config/vim/plugin/cecutil.vim}, %q{lib/utils/config/vim/plugin/fugitive.vim}, %q{lib/utils/config/vim/plugin/lusty-explorer.vim}, %q{lib/utils/config/vim/plugin/rails.vim}, %q{lib/utils/config/vim/plugin/rubyextra.vim}, %q{lib/utils/config/vim/plugin/surround.vim}, %q{lib/utils/config/vim/plugin/taglist.vim}, %q{lib/utils/config/vim/plugin/test/IndentAnything/test.js}, %q{lib/utils/config/vim/plugin/vimballPlugin.vim}, %q{lib/utils/config/vim/syntax/Decho.vim}, %q{lib/utils/config/vim/syntax/eruby.vim}, %q{lib/utils/config/vim/syntax/javascript.vim}, %q{lib/utils/config/vim/syntax/ragel.vim}, %q{lib/utils/config/vim/syntax/ruby.vim}, %q{lib/utils/config/vimrc}, %q{lib/utils/editor.rb}, %q{lib/utils/file_xt.rb}, %q{lib/utils/find.rb}, %q{lib/utils/finder.rb}, %q{lib/utils/grepper.rb}, %q{lib/utils/md5.rb}, %q{lib/utils/patterns.rb}, %q{lib/utils/version.rb}, %q{utils.gemspec}]
|
15
15
|
s.homepage = %q{http://github.com/flori/utils}
|
16
16
|
s.rdoc_options = [%q{--title}, %q{Utils - Some useful command line utilities}, %q{--main}, %q{README.rdoc}]
|
17
17
|
s.require_paths = [%q{lib}]
|
18
|
-
s.rubygems_version = %q{1.8.
|
18
|
+
s.rubygems_version = %q{1.8.9}
|
19
19
|
s.summary = %q{Some useful command line utilities}
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-26 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gem_hadar
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156354880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.0.11
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156354880
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: spruz
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156354340 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.2.13
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156354340
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: term-ansicolor
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156353800 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,44 +43,44 @@ dependencies:
|
|
43
43
|
version: '1.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156353800
|
47
47
|
description: This ruby gem provides some useful command line utilities
|
48
48
|
email: flori@ping.de
|
49
49
|
executables:
|
50
|
-
- untest
|
51
|
-
- chroot-libs
|
52
|
-
- edit_wait
|
53
50
|
- chroot-exec
|
54
|
-
-
|
55
|
-
- search
|
56
|
-
- strip_spaces
|
57
|
-
- path
|
58
|
-
- edit
|
59
|
-
- git-empty
|
51
|
+
- chroot-libs
|
60
52
|
- classify
|
61
|
-
- utils-install-config
|
62
|
-
- xmp
|
63
53
|
- discover
|
64
|
-
-
|
54
|
+
- edit
|
55
|
+
- edit_wait
|
56
|
+
- errf
|
57
|
+
- git-empty
|
65
58
|
- myex
|
59
|
+
- number_files
|
60
|
+
- path
|
66
61
|
- probe
|
67
|
-
- errf
|
68
62
|
- same_files
|
63
|
+
- search
|
64
|
+
- sedit
|
65
|
+
- sshscreen
|
66
|
+
- strip_spaces
|
69
67
|
- unquarantine_apps
|
68
|
+
- untest
|
69
|
+
- utils-install-config
|
70
70
|
- vacuum_firefox_sqlite
|
71
|
-
-
|
71
|
+
- xmp
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files:
|
74
74
|
- README.rdoc
|
75
|
-
- lib/utils/finder.rb
|
76
|
-
- lib/utils/version.rb
|
77
|
-
- lib/utils/find.rb
|
78
75
|
- lib/utils/config.rb
|
79
76
|
- lib/utils/editor.rb
|
80
|
-
- lib/utils/grepper.rb
|
81
77
|
- lib/utils/file_xt.rb
|
78
|
+
- lib/utils/find.rb
|
79
|
+
- lib/utils/finder.rb
|
80
|
+
- lib/utils/grepper.rb
|
82
81
|
- lib/utils/md5.rb
|
83
82
|
- lib/utils/patterns.rb
|
83
|
+
- lib/utils/version.rb
|
84
84
|
- lib/utils.rb
|
85
85
|
files:
|
86
86
|
- .gitignore
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 1.8.
|
195
|
+
rubygems_version: 1.8.9
|
196
196
|
signing_key:
|
197
197
|
specification_version: 3
|
198
198
|
summary: Some useful command line utilities
|