edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] Directory Sort
@ 2018-01-13 17:31 Karl Dahlke
  2018-01-13 17:42 ` Dominique Martinet
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2018-01-13 17:31 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

I implemented this because I wanted it, but I didn't document it, because I'm not sure if you like this interface, or if we might change it.
Pull the latest and play around.
This is a way to sort your entries in directory mode in ways other than alphabetical.
It's only meaningful when reading in a directory.
I hardly ever need it, but when I need it, I need it!

Remember the various ls commands?
lsl shows you the length of the file on the current line.
lst time lss size lsy symbolic link lsp permissions lsi inode lsk link count lsm major minor numbers.
To put this on all the files in the scan, enter ls=lt, or some such, then read in the directory.
The equals sign puts it on all files in the directory listing.
All this was there before.
I'm trying to keep a similar syntax with the new stuff.

dsrt=a  sort alphabetical.
dsrt=t sort by time.
dsrt=s sort by size.

With help messages on you'll see the sort mode as you set it.

You can also use + as in dsrt+a.
This is intuitive, with dsrt-a for reverse sort alphabetical.
dsrt-t reverse sort time, dsrt-s reverse sort size.

They can be effective together.
If you care about the times of your files, and you want them sorted that way,

dsrt-t
ls=t
e some_directory

If you are already in a directory and want to change the sort or display,
make the changes and then refresh with rf.

so: did I break anything? Does the new sort work as expected?
Would you change anything as to how it works, or the user interface?
I use qsort so it should be fast even for huge directories,
though it does have to stat each inode.
Finally, when sorting by time or size, should I move all the directories and special files to the end?
They don't really have any meaning in terms of mod time or file size.
I don't do that now but thinking maybe I should, what do you think?

Karl Dahlke

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

end of thread, other threads:[~2018-01-13 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13 17:31 [Edbrowse-dev] Directory Sort Karl Dahlke
2018-01-13 17:42 ` Dominique Martinet
2018-01-13 17:56   ` Karl Dahlke

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