Description of problem:
Using -Z undoes -l setting, if used after it.
That's not how other ls options work.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
$ ls -dlZ /
drwxr-xr-x. root root system_u:object_r:root_t:s0 /
$ ls -dZl /
drwxr-xr-x. 20 system_u:object_r:root_t:s0 root root 4096 Jul 25 12:07 /
Not true. Try e.g. ls -lm vs. ls -ml . This is exactly how format options behave. Only last one is used.
Unfortunately, RH SELinux patch differs from the upstream a bit (which will change with F22) in the case of SELinux options. RH does have --scontext, --lcontext and --context options - with special security context format. I removed most of the differences, this one was kept, as these downstream ls options were/are part of the various rh documents/rh trainings.
ls -dlZ means use --context format (as -l is overridden by security format)
ls -dZl means use --lcontext format (as -Z enables security context and sets security format - which is overridden by long format).
Previously, it was documented in more details in info documentation, unfortunately this was by-accident removed during one of the rebases.
As this creates this kind of confusion, I removed the security format for Fedora 22/Rawhide with coreutils-8.23 . I will probably remove it for F21, but keep the current behaviour for F20/F19. Closing Rawhide - as this works as you expect with coreutils-8.23-1.fc22.