Add a --exists/-e flag to settings set that sets the setting if it
exists, but doesn't print another error otherwise. This is useful when
setting options in your ~/.lldbinit that might not exist in older
versions of lldb.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I suggested what seems to me a slightly clearer help message, but the added option seems useful. I wondered briefly about whether it might be better as a setting settings set ignore-missing-settings but decided that would make it too easy to overlook errors. It's better to do it explicitly for settings you know don't exist in all the the versions of lldb you are likely to be running against.
lldb/source/Commands/Options.td | ||
---|---|---|
26 | It might be clearer to phrase it focusing on not raising an error if the setting doesn't exist like: Set the setting if it exists, but do not cause the command to raise an error if it does not exist. |
It might be clearer to phrase it focusing on not raising an error if the setting doesn't exist like:
Set the setting if it exists, but do not cause the command to raise an error if it does not exist.