diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2023-04-29 20:33:37 +0330 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2023-05-05 09:35:24 +0330 |
commit | 24c7995743116a79672ce7c930fe0781522c893b (patch) | |
tree | da259caef7d540ff7eeba389ae694617c225eabf /Userland/Shell/Shell.cpp | |
parent | 4d00b372c84533a5ac6fae272f2ff3f23782a6bc (diff) | |
download | serenity-24c7995743116a79672ce7c930fe0781522c893b.zip |
Shell: Rename the verb {lookup => look_up}
Diffstat (limited to 'Userland/Shell/Shell.cpp')
-rw-r--r-- | Userland/Shell/Shell.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index 5c0caa7415..32d7280d5d 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -352,7 +352,7 @@ Shell::LocalFrame* Shell::find_frame_containing_local_variable(StringView name) return nullptr; } -ErrorOr<RefPtr<AST::Value const>> Shell::lookup_local_variable(StringView name) const +ErrorOr<RefPtr<AST::Value const>> Shell::look_up_local_variable(StringView name) const { if (auto* frame = find_frame_containing_local_variable(name)) return frame->local_variables.get(name).value(); @@ -369,7 +369,7 @@ ErrorOr<RefPtr<AST::Value const>> Shell::get_argument(size_t index) const return adopt_ref(*new AST::StringValue(TRY(String::from_deprecated_string(current_script)))); --index; - if (auto argv = TRY(lookup_local_variable("ARGV"sv))) { + if (auto argv = TRY(look_up_local_variable("ARGV"sv))) { if (argv->is_list_without_resolution()) { AST::ListValue const* list = static_cast<AST::ListValue const*>(argv.ptr()); if (list->values().size() <= index) @@ -389,7 +389,7 @@ ErrorOr<RefPtr<AST::Value const>> Shell::get_argument(size_t index) const ErrorOr<DeprecatedString> Shell::local_variable_or(StringView name, DeprecatedString const& replacement) const { - auto value = TRY(lookup_local_variable(name)); + auto value = TRY(look_up_local_variable(name)); if (value) { StringBuilder builder; builder.join(' ', TRY(const_cast<AST::Value&>(*value).resolve_as_list(const_cast<Shell&>(*this)))); @@ -1095,7 +1095,7 @@ bool Shell::is_allowed_to_modify_termios(const AST::Command& command) const if (command.argv.is_empty()) return false; - auto value = lookup_local_variable("PROGRAMS_ALLOWED_TO_MODIFY_DEFAULT_TERMIOS"sv); + auto value = look_up_local_variable("PROGRAMS_ALLOWED_TO_MODIFY_DEFAULT_TERMIOS"sv); if (value.is_error()) return false; |