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

Re: PATCH: cursor position after completion



I would like to request a different solution to cursor positioning with
completion and matching control.

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.

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.

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.

One problem with matching control is that it can leave the cursor deserted
at a position that doesn't allow you to make the choice you want to
make.  For example
	% mkdir /tmp/test
	% cd /tmp/test
	% touch zsh3.1.6-pws-3  zsh3.1.6-test-3 zsh3.1.6-test-3_debug
	% compctl -M 'r:|[.,_-]=*'
	% more zsh[] 		#Hit TAB and you get:
	% more zsh3.1.6--3[]

But if you wanted the zsh3.1.6-pws-3 you have to move the cursor up to the
position between the minus signs.

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.

-FR.
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com



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