Working with filters

Leaving the filter out

Commands that only list — such as QOps-ShowExtensions — return everything when no filter is given. That is how you tell "my filter matched nothing" apart from "this environment has nothing".

Commands that writeQOps-PrepareExtensions, QOps-BuildExtensions, QOps-ReleaseExtensions and their data-connection and custom-property counterparts — do not act on everything by default. With no filter given and none saved in the repository they do nothing and tell you so. Pass -Filter * when you do mean all of them.

Listing costs nothing and undoes nothing, so the helpful default is to show what is there. Writing changes the environment, so it waits to be told what to change.

Leaving the filter out

Commands that only list — such as QOps-ShowExtensions — return everything when no filter is given. That is how you tell "my filter matched nothing" apart from "this environment has nothing".

Commands that writeQOps-PrepareExtensions, QOps-BuildExtensions, QOps-ReleaseExtensions and their data-connection and custom-property counterparts — do not act on everything by default. With no filter given and none saved in the repository they do nothing and tell you so. Pass -Filter * when you do mean all of them.

Listing costs nothing and undoes nothing, so the helpful default is to show what is there. Writing changes the environment, so it waits to be told what to change.

Wildcard patterns

In QOps, you can use patterns for more flexible selection of elements when working with filters. Below are examples of pattern usage:

1. Multiple characters ( * ):

Used to replace any number of characters. 

For example, QOps-Apps -Filter "Name=QOps*App" will find applications with names like "QOps_App", "QOps111App", "QOpsMyApp", etc.

2. One of the character set ( [...] ):

Used to select one of the possible characters in a set.

For example, QOps-Apps -Filter "Name=QOpsApp[125]" will find applications with names like "QOpsApp1", "QOpsApp2", "QOpsApp5".

You can also specify a range of suitable characters, for example, QOps-Apps -Filter "Name=QOpsApp[A-C]" will find applications with names like "QOpsAppA", "QOpsAppB", "QOpsAppC".

Escaping special characters

In QOps, all valid special characters in names are escaped by default, with the exception of "[" and "]". For these special characters, you need to place them in additional square brackets to escape them.

For example, if you need to find an application with the name "QOpsApp[Test]", you need to escape the square brackets as follows: QOps-Apps -Filter "Name=QOpsApp[[]Test[]]".