mkromberg / ucmds

Morten's User Commands
MIT License
0 stars 0 forks source link

]FileAssociations: "status" should always show separate associations, and also show dir status and current default actions #20

Closed abrudz closed 2 years ago

abrudz commented 2 years ago

E.g.

      ]fileAssociations status
Status for ALL users:                                                       

Installed instances are:                                                    

      18.2U64  18.1U64  18.0U64  18.0C32  12.1U64                           

Current associations:                                                       

      Workspace Preview  18.2U64                                            
      Source Preview     18.2U64
      dir                18.2U64  context menu items shown
      dcfg               18.2U64  default action is Edit
      dws                18.2U64  default action is Run
      dyalog             18.2U64  default action is Edit
      dyapp              18.2U64  default action is Run
      apls               18.2U64  default action is Run

Example:  To set associations to the instance you're using right now, enter:

      ]FileAssociations 18.2U64                                             
mkromberg commented 2 years ago

I decided not to add the "associations not shown" text, because:

1) Directories cannot be associated with a version but have the menu not shown. Either they are associated with a version, or not. 2) For older versions, other associations may be missing. Before this fix, those entries would just have been missing from the report.

Now, if associations are not set up, we just report "none", for all types of files, for example:

Current associations:                                                       

      Directories        none                                               
      Source Preview     19.0U64                                            
      Workspace Preview  19.0U64                                            
      dcfg               none                                               
      dws                17.1U64  default action is Run                     
      dyalogscript       none                                               
      dyapp              17.1U64  default action is Run                     
      source             17.1U64  default action is Edit