[Lldb-commits] [PATCH] D52772: [Settings] Make "settings set" without a value equivalent to "settings clear"

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 3 05:50:54 PDT 2018

JDevlieghere added a comment.

In https://reviews.llvm.org/D52772#1252656, @jingham wrote:

> Would it be possible for the exporter to notice empty settings and write "settings clear" instead?

I don't think we can if we want to re-use the existing dump infrastructure, unless there's a way to ask a `Property` if is empty/has a default value?

> I'm worried that if you have a complicated setting, and the you do:
> (lldb) settings set target.some-complex-setting
> and decide you are wrong, you don't want to change the complex setting, then you have to know to delete the text - hitting a return is actually destructive.

This sounds like a very specific issue, though. You have the same problem if the value is something like a string and the user accidentally types one more character. What kind of scenario do you have in mind where a user would be able to type the command but not know how to delete it? I'm definitely not saying it's not a valid reason to consider alternatives and the current behavior is nice, but do you consider this a showstopper?



More information about the lldb-commits mailing list