zsh-workers
 help / color / mirror / code / Atom feed
* Re: blah*[TAB] (difference between 3.1.6 and 3.1.9)
@ 2000-06-07  6:49 Sven Wischnowsky
  2000-06-07 14:42 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 2000-06-07  6:49 UTC (permalink / raw)
  To: zsh-workers


[moved to workers]

I wrote:

> Bart Schaefer wrote:
> 
> > On Jun 6,  3:07am, Vincent Lefevre wrote:
> > } Subject: blah*[TAB] (difference between 3.1.6 and 3.1.9)
> > }
> > } Consider a directory where there are two files blah1 and blah2. With
> > } zsh 3.1.6, when I typed blah* followed by a tab, "blah1 blah2 " was
> > } generated (with a space after blah2). With zsh 3.1.9, "blah1 blah2"
> > } is generated (with *no* space after blah2).
> > } 
> > } How can I have the old behavior (much more logical IMHO)?
> > 
> > Something's definitely gone wrong with expand-or-complete.  This was not
> > intentional.
> 
> Ahem. Changed in 9777 in reply to 9756 (guess the author).
> 
> 9777 commented out some stuff in doexpansion(). Change it back?

I want to get that from my todo-list. Should we change it back? Bart
(9765 was from you)?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: blah*[TAB] (difference between 3.1.6 and 3.1.9)
  2000-06-07  6:49 blah*[TAB] (difference between 3.1.6 and 3.1.9) Sven Wischnowsky
@ 2000-06-07 14:42 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-06-07 14:42 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

On Jun 7,  8:49am, Sven Wischnowsky wrote:
} Subject: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9)
}
} I wrote:
} 
} > Bart Schaefer wrote:
} > 
} > > Something's definitely gone wrong with expand-or-complete.  This was not
} > > intentional.
} > 
} > Ahem. Changed in 9777 in reply to 9756 (guess the author).
} > 
} > 9777 commented out some stuff in doexpansion(). Change it back?
} 
} I want to get that from my todo-list. Should we change it back? Bart
} (9765 was from you)?

Sorry, I couldn't make up my mind yesterday.

In 9777 you wrote:
> About the space: this was obviously intentional, too. I've just
> changed the test in doexpansion() so we can go back easily if suddenly 
> we decide the old behaviour was better. But what I would really like
> to have is a better test: when do we want the space and when not.

I think it should add the space only when the expansion results in more
than one word being inserted.  The reasoning is that it probably doesn't
make sense to continue completing only the last of several words that
were generated from the same pattern, but if only one word resulted then
it might reasonably be a prefix of a longer completion.

The potential issue I see with this is that what a lot of people want is
really expand-AND-complete (not "or"), which makes them think a space
should be appended if the result is an existing plain file, or something
like that.  In fact, I used to be one of them; for a long time I had
"setopt recexact" just so that two tabs would expand and then insert a
space rather than expand and then produce a listing (when one file name
is a prefix of another).  I've since come to the conclusion that recexact
is almost always more trouble than it is worth.  However, that doesn't
help resolve this ... perhaps another style?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-07 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-07  6:49 blah*[TAB] (difference between 3.1.6 and 3.1.9) Sven Wischnowsky
2000-06-07 14:42 ` Bart Schaefer

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).