* _path_files in numeric order
@ 2016-08-19 11:53 Christian Neukirchen
2016-08-19 17:34 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Christian Neukirchen @ 2016-08-19 11:53 UTC (permalink / raw)
To: zsh-workers
Hi,
I was looking into how to make plain file name completion order "by
version", ie. "foo1 foo9 foo10" and found this to be missing from the
"file-sort" style. I think the easiest way to add this is to put
[[ "$tmp1" = *numeric* ]] && sort="${sort}n"
in _path_files, below the *rev* and *follow* things.
If anyone has a less invasive method, please tell me. Else, I propose
to add this feature (or alternatively, a way to inject own sorting
flags directly).
Thanks,
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: _path_files in numeric order
2016-08-19 11:53 _path_files in numeric order Christian Neukirchen
@ 2016-08-19 17:34 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-08-19 17:34 UTC (permalink / raw)
To: zsh-workers
On Aug 19, 1:53pm, Christian Neukirchen wrote:
}
} I was looking into how to make plain file name completion order "by
} version", ie. "foo1 foo9 foo10" and found this to be missing from the
} "file-sort" style. I think the easiest way to add this is to put
}
} [[ "$tmp1" = *numeric* ]] && sort="${sort}n"
This seems fine to me.
} If anyone has a less invasive method, please tell me.
The only other way to do this is to pass a glob with a qualifier to
the -g option of _path_files, which isn't controllable by zstyle in
any way I can think of.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-19 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-19 11:53 _path_files in numeric order Christian Neukirchen
2016-08-19 17:34 ` 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).