Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Approximate completion



Approximate completion seems to be be broken in some non-obvious way.  If I
try to complete 50dc.z to 50cd.ztst, the right completion appears as an
argument to compadd, but nothing is inserted.  Correction with ^Xc seems to
work.  Indeed, completing 50dc.zts works, too: since I have max errors set
to 2, this suggest that for some reason it isn't matching with a * at the
end of the test string at some point.

compadd:9:> compadd -J -default- -X Completing corrections -Qf -p  -W  -F fignore -M r:|/=* r:|=*  -J -default- -X Completing file - 50cd.ztst
_path_files:461:> exppaths=( ) 
_path_files:463:if> zstyle -t :completion:approximate:2::echo::paths expand prefix
_path_files:471:> [[ nm -ne compstate[nmatches] ]]
_files:35:while then> return
_default:25:> [[ -o magicequalsubst ]]
_default:25:cmdand> compset -P 1 *=
_normal:113:> _compskip= 
_normal:115:> return ret
_complete:65:> _compskip= 
_complete:67:> ((  compstate[nmatches]  ))
_approximate:106:while> [[ 6 -le _comp_correct+1 ]]
_approximate:107:while> ((  _comp_correct++  ))
_approximate:75:while> [[ _comp_correct -le comax ]]
_approximate:110:> compstate[matcher]=2 
_approximate:111:> unfunction compadd
_approximate:113:> return 1
_main_complete:73:if> ((  0  ))
_main_complete:126:elif> [[ compstate[matcher] -eq compstate[total_matchers] && 3 -ne 0 ]]
_main_complete:128:elif cmdand> zstyle -s :completion:warnings format format
_main_complete:146:if> [[ compstate[matcher] -eq compstate[total_matchers] ]]
_main_complete:151:then> _used_tags=( all-files ) 
_main_complete:152:then> _unused_tags=( files corrections original ) 
_main_complete:159:then> comppostfuncs=( ) 
_main_complete:161:then> _lastcomp=( list_lines 0 all_quotes \ nmatches 0 pattern_match * restore auto context command vared  unambiguous  list_max 100 unambiguous_cursor 1 list ambiguous total_matchers 2 alternate_nmatches 0 exact  to_end match last_prompt yes pattern_insert menu matcher_string r:|[.,_-]=* r:|=* matcher 2 insert menu ) 
_main_complete:162:then> _lastcomp[completer]=_approximate 
_main_complete:163:then> _lastcomp[prefix]=50dc.z 
_main_complete:164:then> _lastcomp[suffix]= 
_main_complete:165:then> _lastcomp[iprefix]= 
_main_complete:166:then> _lastcomp[isuffix]= 
_main_complete:167:then> _lastcomp[qiprefix]= 
_main_complete:168:then> _lastcomp[qisuffix]= 
_main_complete:169:then> _lastcomp[offered_tags]=files:all-files:corrections:original 
_main_complete:170:then> _lastcomp[tried_tags]=all-files 
_main_complete:171:then> _lastcomp[failed_tags]= 
_main_complete:172:then> _lastcomp[unused_tags]=files:corrections:original 
_main_complete:173:then> _lastcomp[used_tags]=all-files 
_main_complete:176:> return ret

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author