A scope encapsulates the concept of commands or command extensions only applying in certain scenarios such as when a certain application is active, or an arbitrary function evaluates to true

Registering a scope

The following registers and returns a Scope instance:

  name: 'my-custom-scope',
  // list of bundle ids(darwin)
  applications: [''],
  // or a single application
  application: '',
  // and/or condition(s)
  conditions: function(input, context) {return true}
  condition: function(input, context) {return true}

Check if scope is active'my-custom-scope') => Boolean{scope: 'my-custom-scope'}) => Boolean{something: 'irrelevant'}) => true => true

Determine bundle id using commandline

osascript -e 'id of app "Eclipse"'

results matching ""

    No results matching ""