coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

ls: gnu test case `quote-align` compatibility

Open matrixhead opened this issue 1 year ago • 0 comments

This gnu test checks if ls properly aligns the text when it is quoted. However, there was nothing wrong with uu-ls's alignment. The problem was that our ls wasn't quoting the directory name that appears in recursive mode under certain conditions. for example:

# We create two folders, one with a ':' in it and one without.
mkdir dir:name dirname2
# Now we run gnu-ls with qouting enabled.
ls -R --quoting=shell-escape

this would give us

.:
dir:name  dirname2

'./dir:name':

./dirname2:

Notice there are quotes around dirname with ':' in it, but if we run uu-ls with the same arguments that would give us.

.:
dir:name  dirname2

./dir:name:

./dirname2:

Notice there are no quotes around dirname with ':' in it. They probably do this so that the user can distinguish the column from the directory name and the one from the ls prints

matrixhead avatar Jul 09 '24 12:07 matrixhead