zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Approximate completion
Date: Tue, 21 Dec 1999 22:34:56 +0000	[thread overview]
Message-ID: <E120Xqe-0002DO-00.1999-12-21-22-33-41@cmailg7.svr.pol.co.uk> (raw)

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@pwstephenson.fsnet.co.uk>


                 reply	other threads:[~1999-12-21 22:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E120Xqe-0002DO-00.1999-12-21-22-33-41@cmailg7.svr.pol.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).