def expand_optionally_negative_switches(switches)
      switches.reduce([]) do |memo, val|
        if val =~ /\[no-\]/
          memo << val.gsub(/\[no-\]/, '')
          memo << val.gsub(/\[no-\]/, 'no-')
        else
          memo << val
        end
      end
    end
expand switches of the style '--[no-]blah' into both their
'--blah' and '--no-blah' variants, so that they can be
properly detected and removed