[pmwiki-users] New skin: Lens

Patrick R. Michaud pmichaud at pobox.com
Sun Sep 4 11:16:56 CDT 2005


On Sat, Sep 03, 2005 at 01:01:04PM -0400, Bronwyn Boltwood wrote:
> On 9/2/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > Ah, I see.  Unfortunately, the trick is also getting undone by
> > other changes in the OS:
> 
> I admit that I had only expected it to work with a simple sort-by-name...
>  
> > and my shell (bash) doesn't seem like it much:
> > 
> 
> That's too much hassle.  Okay, after some research about filesystems,
> bash, and special characters, possible options are:
> - give up: shared
> - use uppercase: Shared
> - use an underscore (the only legal-anywhere character I could find): _shared
> 
> Will someone with more cross-platform experience please tell me which
> of these is best, and then I'll change it accordingly?

Neither of the last two work in all environments -- on my system:

    [pmichaud at power lens]$ ls -l
    total 26
    drwxr-xr-x  2 pmichaud pmichaud  1024 Aug 31 12:54 eggs
    -rw-r--r--  1 pmichaud pmichaud  3262 Sep  1 11:56 implementation.txt
    -rw-r--r--  1 pmichaud pmichaud 10105 Sep  2 16:20 included_wikipages.txt
    drwxrwxrwx  2 pmichaud pmichaud  1024 Sep  2 16:20 newtheme
    -rw-r--r--  1 pmichaud pmichaud  7052 Sep  2 16:51 readme.txt
    drwxrwxrwx  2 pmichaud pmichaud  1024 Sep  2 16:16 sample
    drwxr-xr-x  5 pmichaud pmichaud  1024 Aug 31 12:18 !shared
    -rw-r--r--  1 pmichaud pmichaud     0 Sep  4 10:23 Shared
    -rw-r--r--  1 pmichaud pmichaud     0 Sep  4 11:08 _Shared
    -rw-r--r--  1 pmichaud pmichaud     0 Sep  2 17:29 xyz

To give a sense of what is happening: sometime in the recent past
the ls(1) command was "localized" so that it sorts based upon the
current locale setting, and for "LANG=en_US" at least, that means to
ignore leading punctuation and to sort case-insensitively.  If I change
back to the "C" locale I get the standard ASCII-based sort that
programmers have been used to...

    [pmichaud at power lens]$ LANG=C ls -l
    total 26
    drwxr-xr-x  5 pmichaud pmichaud  1024 Aug 31 12:18 !shared
    -rw-r--r--  1 pmichaud pmichaud     0 Sep  4 10:23 Shared
    -rw-r--r--  1 pmichaud pmichaud     0 Sep  4 11:08 _Shared
    drwxr-xr-x  2 pmichaud pmichaud  1024 Aug 31 12:54 eggs
    -rw-r--r--  1 pmichaud pmichaud  3262 Sep  1 11:56 implementation.txt
    -rw-r--r--  1 pmichaud pmichaud 10105 Sep  2 16:20 included_wikipages.txt
    drwxrwxrwx  2 pmichaud pmichaud  1024 Sep  2 16:20 newtheme
    -rw-r--r--  1 pmichaud pmichaud  7052 Sep  2 16:51 readme.txt
    drwxrwxrwx  2 pmichaud pmichaud  1024 Sep  2 16:16 sample
    -rw-r--r--  1 pmichaud pmichaud     0 Sep  2 17:29 xyz

but it's a bit much to expect the typical wikiadmin to know (or care)
about file listing sort orders or locale settings, so when they see
the differently-named entries they'll be wondering what those special
characters mean...  (I still get questions about the ".d" extensions
on "wiki.d/" and "wikilib.d/".)

I'd just go with "shared", or perhaps Neil's suggestion to use "all".
And yes, it has long bugged me that the default sort was changed; I
wonder how many scripts are out in the world that were built assuming
an ASCII-based sort output from ls(1) and are now getting 
something different...

Pm




More information about the pmwiki-users mailing list