remove (5)

Attempts to remove a file property, file/property value combination, or expressions from a given property/value combination within the selected systems.

Please note that using this command will re-indent and remove all comments from the selected systems’ UDA files. It is recommended that you choose a single approach to working with UDA:

  • Editing by hand, trading complexity for being able to use the full feature set of UDA.

  • Editing via the CLI, which is less complex but does not allow advanced features such as multiple assignment groups.

usage: cmri system file-property remove <--name PROPERTY_NAME> [<--value PROPERTY_VALUE> [--expressions EXPRESSIONS]]

required arguments:

-n, --name

The name of the file property to remove or modify. If the property does not exist, no action will be taken. If the file property/value combination exists already the provided expressions will be removed from the file property’s assignment group.

optional arguments:

-v, -value

The property value to remove or modify.

-e,``-expression``

A comma-separated list of expressions to remove from the file property definition. Must be an exact match to one of the expressions in the file property definition. Expressions not found will be skipped. See Expressions below for details about expressions. Must be provided in conjunction with the --value option.

Expressions

Expressions are evaluated in the order they appear. Take for example two expression lists: *,~*.h and ~*.h,*. The former will include every file, then exclude all files beginning with *.h whereas the latter would simply include every file, as the exclusion happens before the inclusion.

Expressions beginning with ~ are treated as exclusions; to begin an expression with a literal ~ prefix the expression with \. For example, the literal ~thingstartingwithtilde must be provided as \~thingstartingwithtilde.

Expressions beginning with $ are reserved for future use; to begin an expression with a literal $ prefix the expression with \. For example, the literal $thingstartingwithdollar must be provided as \$thingstartingwithdollar. At the time of writing expressions beginning with $ are unsupported, their presence in an expression list will result in the command failing with an error.

Commas, themselves, may be escaped by surrounding the expression in quotes. For example, -e '"some,path/*",other/*' would result in 2 expressions:

  • some,path/*

  • other/*

To escape double-quotes, surround the expression in quotes and use 2 adjacent quote characters inside:

"""escaped double quotes""" resolves to "escaped double quotes".