zsh-workers
 help / color / mirror / code / Atom feed
* sort completion list numerically
@ 2001-06-27  7:44 Andrej Borsenkow
  2001-06-27  7:57 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 2001-06-27  7:44 UTC (permalink / raw)
  To: ZSH Workers Mailing List

Is it possible to sort lists numerically, so that foo-2.3.10 comes after
foo-2.3.9? Ideally, this should apply to every part so that the order would
be

foo-2.3.9
foo-2.3.10
foo-2.10.1

-andrej


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

* Re: sort completion list numerically
  2001-06-27  7:44 sort completion list numerically Andrej Borsenkow
@ 2001-06-27  7:57 ` Bart Schaefer
  2001-06-27  8:16   ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2001-06-27  7:57 UTC (permalink / raw)
  To: Andrej Borsenkow, ZSH Workers Mailing List

On Jun 27, 11:44am, Andrej Borsenkow wrote:
} Subject: sort completion list numerically
}
} Is it possible to sort lists numerically, so that foo-2.3.10 comes after
} foo-2.3.9?

I don't think so, but what happens if you `setopt numeric_glob_sort'?

} Ideally, this should apply to every part

What defines a "part"?  A match spec?  Which match spec, if there are
several?

The best way I can think of would be to have the function that generates
the matches put them into the correct ordering and then add them with
compadd -V, but that may mean re-inventing a whole lot of the completion
system ...

-- 
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] 4+ messages in thread

* RE: sort completion list numerically
  2001-06-27  7:57 ` Bart Schaefer
@ 2001-06-27  8:16   ` Andrej Borsenkow
  2001-06-27  8:36     ` Sven Wischnowsky
  0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 2001-06-27  8:16 UTC (permalink / raw)
  To: ZSH Workers Mailing List


> On Jun 27, 11:44am, Andrej Borsenkow wrote:
> } Subject: sort completion list numerically
> }
> } Is it possible to sort lists numerically, so that foo-2.3.10 comes after
> } foo-2.3.9?
>
> I don't think so, but what happens if you `setopt numeric_glob_sort'?
>

Actually, it does exactly what I want in this case (incuding proper sorting
of 1.2.3 and 1.10.3). Wonder.

-andrej


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

* Re: RE: sort completion list numerically
  2001-06-27  8:16   ` Andrej Borsenkow
@ 2001-06-27  8:36     ` Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2001-06-27  8:36 UTC (permalink / raw)
  To: zsh-workers

Andrej Borsenkow wrote:

> > On Jun 27, 11:44am, Andrej Borsenkow wrote:
> > } Subject: sort completion list numerically
> > }
> > } Is it possible to sort lists numerically, so that foo-2.3.10 comes after
> > } foo-2.3.9?
> >
> > I don't think so, but what happens if you `setopt numeric_glob_sort'?
> >
> 
> Actually, it does exactly what I want in this case (incuding proper sorting
> of 1.2.3 and 1.10.3). Wonder.

Naaa, I've added some time ago on user request.  And wondered why I
didn't have that idea myself...


Bye
  Sven


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


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

end of thread, other threads:[~2001-06-27  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-27  7:44 sort completion list numerically Andrej Borsenkow
2001-06-27  7:57 ` Bart Schaefer
2001-06-27  8:16   ` Andrej Borsenkow
2001-06-27  8:36     ` Sven Wischnowsky

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