[Info-vax] DIRECTORY: bug or feature

Fred Zwarts (KVI) F.Zwarts at KVI.nl
Thu May 31 03:17:49 EDT 2012


"Phillip Helbig---undress to reply"  wrote in message 
news:jq5k9e$65d$1 at online.de...
>
>The command
>
>   $  DIR []*.AA,*.AB
>
>shows the same output as
>
>   $  DIR []
>
>if only *.AA and *.AB are in the directory.  Ditto for
>
>   $  DIR []*.A*
>
>Extending this,
>
>   $  DIR [...]*.A*
>
>produces similar results.



But note that the command

$ DIR []*.AB,*.AA

produces different output. The files are not sorted.



> However,
>
>   $  DIR [...]*.AA,*.AB
>
>will list directories twice, once with *.AA and then again with *.AB.

Only if there are more directories with file matching *.AA and *.AB.

>Has the behaviour always been this way?
>
>Bug or feature?
>
>Wouldn't things be more logical if the second and fourth commands
>produced the same output, since the first and third do?

The directory command does not do any sorting. It just shows the files in 
the order in which the parse function gives them. If a file happens to be in 
another directory than the previous one, then a new directory header is 
printed. It seems very logical to me. 




More information about the Info-vax mailing list