martinpitt / fatrace

report system wide file access events
GNU General Public License v3.0
173 stars 12 forks source link

--columns to display customized column order and column widths #15

Open porg opened 2 years ago

porg commented 2 years ago

Feature Request

User Goals

Principles

  1. Letters correspond to column-names.
  2. Numbers immediately after letter means to truncate that column to that length
    • Special number 0 means: Use the remainder of the available width (if the Terminal defines it).
    • Default truncation: Leave that amount of characters and then cut off the end of the string, with no cutoff character.
      • p10 would shorten like this: "Plex Media Server" → "Plex Media…"
    • Use dots to specify how the truncation is performed
      • After the number like p10. means cut off the start of the string:
      • "Plex Media Server" → "Plex Media…"
      • Before the number like p.10 means cut off the end of the string:
      • "Plex Media Server" → "…dia Server"
      • Between two numbers like f30.30 means to leave the first 30 characters, then show a elipsis "………", then "leave last 30 characters, example:
        • Full column: /srv/disk-id/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
        • Shortened to: /srv/disk-id/Plex/Library/Appl…………com.plexapp.plugins.library.db
  3. All characters other than A-Z, a-z, 0-9 and . are literals (whitespaces, punctuation, special symbols like #, or ;
  4. The column order is defined simply by how you order the column letters within that formatting string.
  5. If you have a t in there but no --timestamp argument the default timestamp format is used.

Explanation of --columns "t u p10.(P) g10.(G) e f30.30"

porg commented 1 year ago

Any plans for implementation?

porg commented 1 year ago

I updated my proposal with g group-name and G group-id of the file-I/O-process-owner.