command-t 3.0.2 → 4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/doc/command-t.txt +312 -147
- data/ruby/command-t.rb +13 -12
- data/ruby/command-t/controller.rb +86 -15
- data/ruby/command-t/depend +4 -0
- data/ruby/command-t/ext.h +9 -2
- data/ruby/command-t/extconf.rb +2 -2
- data/ruby/command-t/finder.rb +6 -2
- data/ruby/command-t/finder/buffer_finder.rb +3 -3
- data/ruby/command-t/finder/command_finder.rb +23 -0
- data/ruby/command-t/finder/file_finder.rb +3 -3
- data/ruby/command-t/finder/help_finder.rb +25 -0
- data/ruby/command-t/finder/history_finder.rb +27 -0
- data/ruby/command-t/finder/jump_finder.rb +3 -3
- data/ruby/command-t/finder/line_finder.rb +23 -0
- data/ruby/command-t/finder/mru_buffer_finder.rb +3 -3
- data/ruby/command-t/finder/tag_finder.rb +3 -3
- data/ruby/command-t/heap.c +146 -0
- data/ruby/command-t/heap.h +22 -0
- data/ruby/command-t/match.c +183 -116
- data/ruby/command-t/match.h +16 -10
- data/ruby/command-t/match_window.rb +10 -1
- data/ruby/command-t/matcher.c +203 -63
- data/ruby/command-t/metadata/fallback.rb +2 -2
- data/ruby/command-t/mru.rb +2 -2
- data/ruby/command-t/path_utilities.rb +2 -2
- data/ruby/command-t/progress_reporter.rb +38 -0
- data/ruby/command-t/prompt.rb +4 -4
- data/ruby/command-t/scanner.rb +22 -2
- data/ruby/command-t/scanner/buffer_scanner.rb +3 -3
- data/ruby/command-t/scanner/command_scanner.rb +33 -0
- data/ruby/command-t/scanner/file_scanner.rb +30 -6
- data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +12 -7
- data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +11 -8
- data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +7 -4
- data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +13 -5
- data/ruby/command-t/scanner/help_scanner.rb +40 -0
- data/ruby/command-t/scanner/history_scanner.rb +24 -0
- data/ruby/command-t/scanner/jump_scanner.rb +3 -3
- data/ruby/command-t/scanner/line_scanner.rb +45 -0
- data/ruby/command-t/scanner/mru_buffer_scanner.rb +3 -3
- data/ruby/command-t/scanner/tag_scanner.rb +3 -3
- data/ruby/command-t/scm_utilities.rb +2 -2
- data/ruby/command-t/settings.rb +2 -2
- data/ruby/command-t/stub.rb +7 -2
- data/ruby/command-t/util.rb +2 -2
- data/ruby/command-t/vim.rb +27 -2
- data/ruby/command-t/vim/screen.rb +3 -3
- data/ruby/command-t/vim/window.rb +3 -3
- data/ruby/command-t/watchman.c +1 -1
- metadata +13 -2
data/ruby/command-t/settings.rb
CHANGED
data/ruby/command-t/stub.rb
CHANGED
@@ -15,9 +15,14 @@ module CommandT
|
|
15
15
|
[
|
16
16
|
:flush,
|
17
17
|
:show_buffer_finder,
|
18
|
+
:show_command_finder,
|
18
19
|
:show_file_finder,
|
20
|
+
:show_history_finder,
|
21
|
+
:show_help_finder,
|
19
22
|
:show_jump_finder,
|
23
|
+
:show_line_finder,
|
20
24
|
:show_mru_finder,
|
25
|
+
:show_search_finder,
|
21
26
|
:show_tag_finder
|
22
27
|
].each do |method|
|
23
28
|
define_method(method) { warn *@@load_error }
|
@@ -30,5 +35,5 @@ module CommandT
|
|
30
35
|
msg.each { |m| ::VIM::command "echo '#{m}'" }
|
31
36
|
::VIM::command 'echohl none'
|
32
37
|
end
|
33
|
-
end
|
34
|
-
end
|
38
|
+
end
|
39
|
+
end
|
data/ruby/command-t/util.rb
CHANGED
data/ruby/command-t/vim.rb
CHANGED
@@ -66,6 +66,31 @@ module CommandT
|
|
66
66
|
def escape_for_single_quotes(str)
|
67
67
|
str.gsub "'", "''"
|
68
68
|
end
|
69
|
+
|
70
|
+
# Conservatively convert wildignore patterns that we understand to a
|
71
|
+
# regex. Supported patterns noted in the inline comments below.
|
72
|
+
#
|
73
|
+
# If this ends up doing something wrong, set `g:CommandTWildIgnore` to ''
|
74
|
+
# to opt out or otherwise override to produce a conforming pattern.
|
75
|
+
def wildignore_to_regexp(str)
|
76
|
+
patterns = str.split(',')
|
77
|
+
regex = patterns.map do |pattern|
|
78
|
+
if pattern.match(%r{\A([^*/]+)\z})
|
79
|
+
# something (match file at any level)
|
80
|
+
'(\A|/)' + Regexp.escape($~[1]) + '\z'
|
81
|
+
elsif pattern.match(%r{\A\*\.([^*]+)\z})
|
82
|
+
# *.something (match file with extension at any level)
|
83
|
+
'\.' + Regexp.escape($~[1]) + '\z'
|
84
|
+
elsif pattern.match(%r{\A\*/(.+)\z})
|
85
|
+
# */something (match files or directories at any level)
|
86
|
+
'(\A|/)' + Regexp.escape($~[1]) + '(/|\z)'
|
87
|
+
elsif pattern.match(%r{\A\*/([^*]+)/*\z})
|
88
|
+
# */something/* (match directories at any level)
|
89
|
+
'(\A|/)' + Regexp.escape($~[1]) + '(/|\z)'
|
90
|
+
end
|
91
|
+
end.compact.join('|')
|
92
|
+
Regexp.new(regex) unless regex.empty?
|
93
|
+
end
|
69
94
|
end
|
70
|
-
end
|
71
|
-
end
|
95
|
+
end
|
96
|
+
end
|
data/ruby/command-t/watchman.c
CHANGED
@@ -591,7 +591,7 @@ VALUE CommandTWatchmanUtils_query(VALUE self, VALUE query, VALUE socket) {
|
|
591
591
|
if (sent == -1) {
|
592
592
|
watchman_raise_system_call_error(errno);
|
593
593
|
} else if (sent != query_len) {
|
594
|
-
rb_raise(rb_eRuntimeError, "expected to send %ld bytes but sent %
|
594
|
+
rb_raise(rb_eRuntimeError, "expected to send %ld bytes but sent %zd",
|
595
595
|
query_len, sent);
|
596
596
|
}
|
597
597
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: command-t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '4.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Hurrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Command-T provides a fast, intuitive mechanism for opening files with a
|
@@ -36,10 +36,16 @@ files:
|
|
36
36
|
- ruby/command-t/extconf.rb
|
37
37
|
- ruby/command-t/finder.rb
|
38
38
|
- ruby/command-t/finder/buffer_finder.rb
|
39
|
+
- ruby/command-t/finder/command_finder.rb
|
39
40
|
- ruby/command-t/finder/file_finder.rb
|
41
|
+
- ruby/command-t/finder/help_finder.rb
|
42
|
+
- ruby/command-t/finder/history_finder.rb
|
40
43
|
- ruby/command-t/finder/jump_finder.rb
|
44
|
+
- ruby/command-t/finder/line_finder.rb
|
41
45
|
- ruby/command-t/finder/mru_buffer_finder.rb
|
42
46
|
- ruby/command-t/finder/tag_finder.rb
|
47
|
+
- ruby/command-t/heap.c
|
48
|
+
- ruby/command-t/heap.h
|
43
49
|
- ruby/command-t/match.c
|
44
50
|
- ruby/command-t/match.h
|
45
51
|
- ruby/command-t/match_window.rb
|
@@ -48,16 +54,21 @@ files:
|
|
48
54
|
- ruby/command-t/metadata/fallback.rb
|
49
55
|
- ruby/command-t/mru.rb
|
50
56
|
- ruby/command-t/path_utilities.rb
|
57
|
+
- ruby/command-t/progress_reporter.rb
|
51
58
|
- ruby/command-t/prompt.rb
|
52
59
|
- ruby/command-t/ruby_compat.h
|
53
60
|
- ruby/command-t/scanner.rb
|
54
61
|
- ruby/command-t/scanner/buffer_scanner.rb
|
62
|
+
- ruby/command-t/scanner/command_scanner.rb
|
55
63
|
- ruby/command-t/scanner/file_scanner.rb
|
56
64
|
- ruby/command-t/scanner/file_scanner/find_file_scanner.rb
|
57
65
|
- ruby/command-t/scanner/file_scanner/git_file_scanner.rb
|
58
66
|
- ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb
|
59
67
|
- ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb
|
68
|
+
- ruby/command-t/scanner/help_scanner.rb
|
69
|
+
- ruby/command-t/scanner/history_scanner.rb
|
60
70
|
- ruby/command-t/scanner/jump_scanner.rb
|
71
|
+
- ruby/command-t/scanner/line_scanner.rb
|
61
72
|
- ruby/command-t/scanner/mru_buffer_scanner.rb
|
62
73
|
- ruby/command-t/scanner/tag_scanner.rb
|
63
74
|
- ruby/command-t/scm_utilities.rb
|