ls: fix column widths and path printing with -l.
If you run
ls -l /bin
you expect to see all the filenames without /bin/ included.
If you run
ls -l /bin/ls
you expect to see the line about /bin/ls *with* the /bin/ included. This is
too allow for stuff like
ls -l /proc/*/fd/2
where seeing a bunch of rows named '2' is totally unhelpful.
'ls -s' (and ls with no options) was already doing this, it's just -l that
didn't.
While we're here, fix the column widths in -l to align. device and symlink
lines didn't use the same widths as regular files, so the output looked
strange.
Change-Id: If0c180c8b3fce26ed509543d2659ec67c114b610
1 file changed