@@ -145,7 +145,6 @@ The return value is the one returned by BODY."
145
145
(should (equal
146
146
(bash-completion--make
147
147
:line " a hello world"
148
- :point 13
149
148
:cword 2
150
149
:words '(" a" " hello" " world" )
151
150
:stub-start 9
@@ -160,7 +159,6 @@ The return value is the one returned by BODY."
160
159
(should (equal
161
160
(bash-completion--make
162
161
:line " a hello "
163
- :point 8
164
162
:cword 2
165
163
:words '(" a" " hello" " " )
166
164
:stub-start 9
@@ -175,7 +173,6 @@ The return value is the one returned by BODY."
175
173
(should (equal
176
174
(bash-completion--make
177
175
:line " make -"
178
- :point 6
179
176
:cword 1
180
177
:words '(" make" " -" )
181
178
:stub-start 27
@@ -190,7 +187,6 @@ The return value is the one returned by BODY."
190
187
(should (equal
191
188
(bash-completion--make
192
189
:line " sort -"
193
- :point 6
194
190
:cword 1
195
191
:words '(" sort" " -" )
196
192
:stub-start 20
@@ -205,7 +201,6 @@ The return value is the one returned by BODY."
205
201
(should (equal
206
202
(bash-completion--make
207
203
:line " find -name '*.txt' -exec echo {} ';' -"
208
- :point 38
209
204
:cword 7
210
205
:words '(" find" " -name" " *.txt" " -exec" " echo" " {}" " ;" " -" )
211
206
:stub-start 38
@@ -220,7 +215,6 @@ The return value is the one returned by BODY."
220
215
(should (equal
221
216
(bash-completion--make
222
217
:line " ZORG=t"
223
- :point 6
224
218
:cword 0
225
219
:words '(" ZORG=t" )
226
220
:stub-start 24
@@ -235,7 +229,6 @@ The return value is the one returned by BODY."
235
229
(should (equal
236
230
(bash-completion--make
237
231
:line " export PATH=/bin:/usr/bi"
238
- :point 24
239
232
:cword 1
240
233
:words '(" export" " PATH=/bin:/usr/bi" )
241
234
:stub-start 18
@@ -250,7 +243,6 @@ The return value is the one returned by BODY."
250
243
(should (equal
251
244
(bash-completion--make
252
245
:line " export PATH=/bin:/usr/bi"
253
- :point 24
254
246
:cword 5
255
247
:words '(" export" " PATH" " =" " /bin" " :" " /usr/bi" )
256
248
:stub-start 18
@@ -265,7 +257,6 @@ The return value is the one returned by BODY."
265
257
(should (equal
266
258
(bash-completion--make
267
259
:line " cd /vcr/shows/Dexter's"
268
- :point 22
269
260
:cword 1
270
261
:words '(" cd" " /vcr/shows/Dexter's" )
271
262
:stub-start 4
@@ -280,7 +271,6 @@ The return value is the one returned by BODY."
280
271
(should (equal
281
272
(bash-completion--make
282
273
:line " cd /vcr/shows/Dexter's"
283
- :point 22
284
274
:cword 1
285
275
:words '(" cd" " /vcr/shows/Dexter's" )
286
276
:stub-start 4
@@ -295,7 +285,6 @@ The return value is the one returned by BODY."
295
285
(should (equal
296
286
(bash-completion--make
297
287
:line " cd /vcr/shows/Dexter's"
298
- :point 22
299
288
:cword 1
300
289
:words '(" cd" " /vcr/shows/Dexter's" )
301
290
:stub-start 4
@@ -311,7 +300,6 @@ The return value is the one returned by BODY."
311
300
(should (equal
312
301
(bash-completion--make
313
302
:line " cd /vcr/shows/Dexter's"
314
- :point 22
315
303
:cword 1
316
304
:words '(" cd" " /vcr/shows/Dexter's" )
317
305
:stub-start 4
@@ -327,7 +315,6 @@ The return value is the one returned by BODY."
327
315
(should (equal
328
316
(bash-completion--make
329
317
:line " "
330
- :point 0
331
318
:cword 0
332
319
:words '(" " )
333
320
:stub-start 2
@@ -380,7 +367,6 @@ garbage
380
367
(bash-completion-generate-line
381
368
(bash-completion--make
382
369
:line " hello worl"
383
- :point 7
384
370
:words '(" hello" " worl" )
385
371
:stub " worl"
386
372
:unparsed-stub " worl"
@@ -392,7 +378,6 @@ garbage
392
378
(bash-completion-generate-line
393
379
(bash-completion--make
394
380
:line " zorg worl"
395
- :point 7
396
381
:words '(" zorg" " worl" )
397
382
:stub " worl"
398
383
:unparsed-stub " worl"
@@ -404,14 +389,13 @@ garbage
404
389
(concat
405
390
" cd >/dev/null 2>&1 /test && "
406
391
" __EMACS_COMPLETE_WRAPPER='COMP_LINE='\\ ''zorg blah worl'\\ ''; "
407
- " COMP_POINT=12 ; COMP_CWORD=2; "
392
+ " COMP_POINT=$(( 1 + ${#COMP_LINE} )) ; COMP_CWORD=2; "
408
393
" COMP_WORDS=( zorg blah worl ); "
409
394
" __zorg zorg worl blah' "
410
395
" compgen -F __emacs_complete_wrapper -- worl 2>/dev/null" )
411
396
(bash-completion-generate-line
412
397
(bash-completion--make
413
398
:line " zorg blah worl"
414
- :point 12
415
399
:words '(" zorg" " blah" " worl" )
416
400
:cword 2
417
401
:stub " worl"
@@ -423,15 +407,14 @@ garbage
423
407
(concat
424
408
" cd >/dev/null 2>&1 /test && "
425
409
" __EMACS_COMPLETE_WRAPPER='COMP_LINE='\\ ''zorg worl'\\ ''; "
426
- " COMP_POINT=7 ; "
410
+ " COMP_POINT=$(( 1 + ${#COMP_LINE} )) ; "
427
411
" COMP_CWORD=1; "
428
412
" COMP_WORDS=( zorg worl ); "
429
413
" __zorg zorg worl zorg' "
430
414
" compgen -F __emacs_complete_wrapper -- worl 2>/dev/null" )
431
415
(bash-completion-generate-line
432
416
(bash-completion--make
433
417
:line " zorg worl"
434
- :point 7
435
418
:words '(" zorg" " worl" )
436
419
:cword 1
437
420
:stub " worl"
@@ -444,7 +427,6 @@ garbage
444
427
(bash-completion-generate-line
445
428
(bash-completion--make
446
429
:line " worl"
447
- :point 7
448
430
:words '(" worl" )
449
431
:cword 0
450
432
:stub " worl"
0 commit comments