zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Completion lists
Date: Tue, 13 Sep 2011 10:40:08 -0700	[thread overview]
Message-ID: <110913104008.ZM14525@torch.brasslantern.com> (raw)
In-Reply-To: <loom.20110913T175934-799@post.gmane.org>

On Sep 13,  4:07pm, Yuri DElia wrote:
}
} $ touch fileaa
} $ touch filebb
} $ ls file<TAB>
} 
} (this will correctly highlight "a" and "b")
} 
} suddenly:
} 
} $ ls ./<TAB>
} 
} will still match the second expression '=(#b)(?)*==1' but here (?)
} will capture the first 4 characters, not just the first one.

The behvior I see is that it *skips* the first 4 characters and 
highlights the fifth one, i.e., it continues to highlight "a" and
"b" in those two files but highlights nothing in file names with
fewer than 5 characters.  Still wrong, but not in the way you said.

} The length is dependent on previous PREFIX ("file" here).
} 
} Bug?

It would appear so.  compstate[insert_positions]=5 at the end of the
"ls ./<TAB>" although compstate[unambiguous_positions]=2.  So the
pattern is matched correctly, but incorrectly is compared to the
string beginning at the 5th position.  Some part of the internal
state that should be getting cleared when the completion restarts,
is not.  This perists across ZLE restarts but not across different
words in command position, e.g. if you complete for "ls" twice in a
row it's broken, but if you complete for "ls" and then for "setopt"
and then back to "ls" again it works correctly all three times (or
at least did for me in a couple of quick trials).

Unfortunately I'm not going to have an opportunity to run that down
anytime soon.  Peter?


  reply	other threads:[~2011-09-13 17:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 12:54 Yuri DElia
2011-09-13 14:43 ` Bart Schaefer
2011-09-13 15:16   ` Yuri DElia
2011-09-13 16:07     ` Yuri DElia
2011-09-13 17:40       ` Bart Schaefer [this message]
2011-09-13 18:48         ` Yuri DElia
2011-09-16 21:04         ` Peter Stephenson
2011-09-16 21:07           ` Peter Stephenson
2011-09-13 16:29     ` Bart Schaefer
2011-09-13 17:11       ` Yuri DElia
2011-09-18 13:41   ` Yuri DElia
2011-09-18 13:48     ` Mikael Magnusson
     [not found]       ` <ed790212f803298ea33fd6091b9d5062@thregr.org>
2011-09-18 14:08         ` Mikael Magnusson
2011-09-18 14:35           ` Yuri D'Elia
2011-09-16 21:58 ` Tomasz Pala

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=110913104008.ZM14525@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).