Since we expect the @path directive to be able to point to an actual 
existing directory, I think it has to allow spaces. With spaces, I suppose 
that the paths would have to be quoted so that they are delimited. I do not 
think that wild card path characters need to be (or should be) supported; 
if included, then Leo would not know how to create a non-existing path, and 
they would never occur in already-existing paths. Actually, there are 
several characters that Windows doesn't allow in paths.  According to 
ChatGPT they are <>:"/\\|?*

I don't like the idea of allowing other non-printing characters even if the 
OS would allow them because a user would have no way of knowing what the 
right character is supposed to be. I don't suppose they occur very often in 
the wild for just this reason.

An alternative for non-printing characters would be to handle them as URLs 
do (e.g., a space becomes %20) and have Leo's code automatically convert 
them. Then the paths wouldn't need to be quoted.  But that would make for 
more code complexity when a user pastes a path from the clipboard into an 
@path directive. I think that pasting an existing path will be the most 
common use case.

Linux and MacOS don't allow a null character (\0).  There are reserved file 
names in Windows (e.g., "CON", "PRN") but since they are file names and not 
paths They probably don't have to be matched or filtered for the purposes 
of @path directives.
On Thursday, April 24, 2025 at 9:28:48 AM UTC-4 Edward K. Ream wrote:

> On Thu, Apr 24, 2025 at 8:25 AM jkn <[email protected]> wrote:
>
> I have vaguely wondered "what does Leo allow in path directives" myself.
>>
>> Isn't the list of 'what characters are allowed in directory names' 
>> OS-dependent??
>>
>
> Indeed yes. Some OS's even allow non-printing characters! Here 
> <https://en.wikipedia.org/wiki/Filename>is the wikipedia discussion.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/e32fed87-f0f0-4d11-9d0d-14146f53e786n%40googlegroups.com.

Reply via email to