Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1669

more convenient way to partially override list properties

    XMLWordPrintable

Details

    Description

      the only way to edit the contents of list properties (that is, add or remove items) is to use the magic original property and js array functions. i'm not sure that's even possible on the command line (no example given in the documentation), but even if it is, it's extremely cumbersome. it would be way more convenient to have a syntax that covers the common cases, and at least for the cli (where it's most important) it would be reasonably easy to implement.

      this issue came up (again) in QBS-1604.

      possible syntax

      • override (existing): foo.bar: baz
      • remove: foo.bar:-: baz
      • prepend: foo.bar:<+: baz
        • alternatively (shorter version): foo.bar:<: baz
      • append: foo.bar:+: baz
        • alternatively (shorter version consistent with prepending): foo.bar:>: baz

      the syntaxes using < and > obviously require quoting on the command line, which is an inconvenience, so the asymmetric version my be preferred (under the assumption that prepending is strictly required only in the minority of cases).

      this syntax potentially conflicts with the csv syntax supported by list properties. however, it seems unproblematic to require quoting of punctuation characters, if that isn't even the case yet.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            buddenha Oswald Buddenhagen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes