summaryrefslogtreecommitdiff
path: root/Shell/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Shell/main.cpp')
-rw-r--r--Shell/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Shell/main.cpp b/Shell/main.cpp
index cf7f330666..9dda6b4a37 100644
--- a/Shell/main.cpp
+++ b/Shell/main.cpp
@@ -700,8 +700,7 @@ static Vector<String> expand_globs(const StringView& path, const StringView& bas
static Vector<String> expand_parameters(const StringView& param)
{
- bool is_variable = param.length() > 1 && param[0] == '$';
- if (!is_variable)
+ if (!param.starts_with('$'))
return { param };
String variable_name = String(param.substring_view(1, param.length() - 1));