Define field contents per filetype

From TotalcmdWiki
Jump to: navigation, search

Imagine the situation where you want to create a new custom column view where you want to add a "Comments" column. No problem you just set the field contents to plugin1.comments which gives you the comments for *.abc files. But what about the comments for *.def files provided by plugin2? Add another column or even a whole new custom column view? Wouldn't it be better to give the user the opportunity to select the field contents per filetype? It's already possible for other program parts like thumbnail view or quickinfos where content plug-ins are involved.

Another example where this could be useful are information about archives. Imagine every plugin providing archive information like Ratio, Number of files and so on requires an extra column.

Custom columns views can be sorted by all visible columns. This means there is a sort problem when the user added by type definitions of different data types. Here are some suggestions how to solve the problem:

My idea to solve the sorting problem would be to provide all available fields when adding the first by field type definition to the column. When adding the second and all subsequent by filetype definitions TC should only provide the fields of the same type as in the first definition.

Another approach could be to convert all field values to strings and sort them as strings. This would probably only look good when using one of the natural sorting options.

Back to Custom column view