Skip to content
Myr

[ruby] Stub out --expect option

Before adoption: this commit came in with the history the project adopted, so no landing records it.

So that it can be used with the recent Vim plugin although extra key bindings are not available

authored by Junegunn Choi · committed by Junegunn Choi · parent 1c65139 · Browse files · 1 file+9 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−0 removed

  • other:+9 added−0 removed

1 file+9 added−0 removed

modified:fzf+9 added
124 unmodified lines
125 @delim = nil126 @reverse = false127 @prompt = '> '128 @shr_mtx = Mutex.new129 @expect = false130 @print_query = false131132 argv =133 if opts = ENV['FZF_DEFAULT_OPTS']
66 unmodified lines
200 when '--print-query' then @print_query = true201 when '--no-print-query' then @print_query = false202 when '-e', '--extended-exact' then @extended = :exact203 when '+e', '--no-extended-exact' then @extended = nil204 when '--expect'205 argv.shift206 @expect = true207 when /^--expect=(.*)$/208 @expect = true209 when '--tac', '--sync'210 # XXX211 else212 usage 1, "illegal option: #{o}"
68 unmodified lines
281 len = empty ? get(:@count) : matches.length282 if loaded283 if @select1 && len == 1284 puts @query if @print_query285 puts if @expect286 burp(empty ? matches.first : matches.first.first)287 exit 0288 elsif @exit0 && len == 0289 puts @query if @print_query290 puts if @expect291 exit 0292 end293 end294
865 unmodified lines
1160 ensure1161 C.close_screen1162 q, selects = geta(:@query, :@selects)1163 @stdout.puts q if @print_query1164 @stdout.puts if @expect1165 if got1166 if selects.empty?1167 burp got1168 else
176 unmodified lines