From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12135 invoked from network); 15 Sep 1999 08:19:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Sep 1999 08:19:15 -0000 Received: (qmail 8301 invoked by alias); 15 Sep 1999 08:19:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7833 Received: (qmail 8294 invoked from network); 15 Sep 1999 08:19:03 -0000 Date: Wed, 15 Sep 1999 10:18:36 +0200 (MET DST) Message-Id: <199909150818.KAA30622@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Felix Rosencrantz's message of Tue, 14 Sep 1999 22:28:38 -0700 (PDT) Subject: Re: PATCH: cursor position after completion Felix Rosencrantz wrote: > I would like to request a different solution to cursor positioning with > completion and matching control. I found myself in situations where I wanted that, too (after the patch)... > When I'm completing filenames where matching control occurs, I'd prefer > the cursor to move to the position of the first place where characters > are missing, not the last. If I'm completing something that might be > an option I would like to have it put me in the last position. ... but I don't think the type of completion is the right thing to base the decision upon. > So to me the questions are: > > How should ZSH decide at which matching hot spot to leave the cursor? > > If it makes the wrong choice, is there a better way for the user to > correct the position and continue completing? > > It seems that there should be a more intuitive solution. I think there > are alternatives to counting matches. > > Maybe a simple mechanism that would allow the user to cycle the > cursor through the matching hot spots of a word. Maybe before menu > completion kicks in the cursor could be moved to the different hot > spots. Though this might be annoying, too. And since a cycle is endless this doesn't seem to make much sense to me. We could add a builtin widget which doesn't break the current completion state and cycles through the positions or we add a special array available only in widgets containing the positions so that we could write a shell function widget doing anything that may seem useful (or two widget: move backward and forward to the previous/next interesting position). > Maybe it would it be useful if there was a parameter to configure if you > prefer the cursor to be positioned at the first or last hot spot. > Or maybe the matching control specifications could be enhanced with cursor > positioning rules. That's another idea I hadn't thought about. But I can't think of *what* we could make expressible this way. > > ... > > I guess I just want it to dwim. One of the reasons, I moved from tcsh to zsh, > is that zsh does matching control, that handles partial completion & > case-sensitivity issues so much better. But this new behavior doesn't feel > quite right. Yes, it's hard to find the right thing. I'd like to hear about any ideas any of you have about this. Or just observations and descriptions of the circumstances when the code did the wrong thing. Every help with this is very much appreciated. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de