lclevy / ADFlib

A free, portable and open implementation of the Amiga filesystem
GNU General Public License v2.0
90 stars 30 forks source link

Added switch for displaying comments next to filename #1

Closed gryf closed 10 years ago

gryf commented 10 years ago

Currently, unadf displays file list with corresponding comment separated by comma and a space. This may be misleading if filename or comment contains such characters, for example:

examples/unadf -rl floppy.adf
unADF v1.0 : a unzip like for .ADF files, powered by ADFlib (v0.7.11a - January 20th, 2007)

Device : Floppy DD. Cylinders = 80, Heads = 2, Sectors = 11. Volumes = 1
Volume : Floppy 880 KBytes, "Empty" between sectors [0-1759]. FFS INTL . Filled at 0.3%.

     10  2014/02/23  12:00:16  test filename, or what, and a comment, which may have comma

This case may result confusion, because there is no other way to distinguish where the filename ends and comment starts than by experiment.

So proposed change is to separate comments from filename, and not show it by default, and make the -m switch, which with conjunction with -l command will display directory in old way. Example:

$ unadf -rl floppy.adf
unADF v1.0 : a unzip like for .ADF files, powered by ADFlib (v0.7.11a - January 20th, 2007)

Device : Floppy DD. Cylinders = 80, Heads = 2, Sectors = 11. Volumes = 1
Volume : Floppy 880 KBytes, "Empty" between sectors [0-1759]. FFS INTL . Filled at 0.3%.

     10  2014/02/23  12:00:16  test filename, or what
$ unadf -rlm floppy.adf
unADF v1.0 : a unzip like for .ADF files, powered by ADFlib (v0.7.11a - January 20th, 2007)

Device : Floppy DD. Cylinders = 80, Heads = 2, Sectors = 11. Volumes = 1
Volume : Floppy 880 KBytes, "Empty" between sectors [0-1759]. FFS INTL . Filled at 0.3%.

     10  2014/02/23  12:00:16  test filename, or what, and a comment, which may have comma
lclevy commented 10 years ago

thanks Gryf for the contribution !