Skip to content

Instantly share code, notes, and snippets.

@joewalker
Created June 26, 2012 14:23
Show Gist options
  • Save joewalker/2996075 to your computer and use it in GitHub Desktop.
Save joewalker/2996075 to your computer and use it in GitHub Desktop.
Components.utils.import("resource:///modules/devtools/gcli.jsm");
gcli.addCommand({
name: 'foo',
params: [
{
name: 'letters',
type: {
name: 'selection',
data: 'aaaa', 'bbbb', 'cccc'
}
}
],
exec: function(args, context) {
return args.letters;
},
});
@joewalker
Copy link
Author

Not working properly - not sure why right now

Components.utils.import("resource:///modules/devtools/gcli.jsm");

gcli.addCommand({
  name: 'foo',
  params: [
    {
      name: 'letters',
      type: {
        name: 'selection',
        lookup: [
          { name:'aaaa', description:'the aaa' },
          { name:'bbbb', description:'the bbb' },
          { name:'cccc', description:'the ccc' },
        ]
      }
    }
  ],
  exec: function(args, context) {
    return args.letters;
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment