mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
terminal: remove bare command validation
Stop highlighting bare tokens matching tool names as errors. Also updates the zenai dependency.
This commit is contained in:
@@ -39,8 +39,8 @@
|
||||
.hash = "N-V-__8AABGOuAC_dhAN07kfoP4dycCFi8Bka4O-tuhriNH8",
|
||||
},
|
||||
.zenai = .{
|
||||
.url = "git+https://github.com/lightpanda-io/zenai.git#db96cffd3a9d0a7bbc26fc6caf99feb783abc164",
|
||||
.hash = "zenai-0.0.0-iOY_VB_FAwB68e1j78QoLVTuyR0DCxAQwTWwADtZxkmV",
|
||||
.url = "git+https://github.com/lightpanda-io/zenai.git#120f5fd2a2d29779fbc44584aaa472ad83c6a153",
|
||||
.hash = "zenai-0.0.0-iOY_VP_EAwBATbpytTro7tmzT1aASeBvKPPvJEO2tEzB",
|
||||
},
|
||||
.isocline = .{
|
||||
.url = "git+https://github.com/arrufat/isocline.git#48d94027aec0408dc58af9ca2dfedf4720870e8c",
|
||||
|
||||
@@ -556,13 +556,7 @@ fn highlighterCallback(henv: ?*c.ic_highlight_env_t, input: [*c]const u8, _: ?*a
|
||||
}
|
||||
highlightSlashArgs(henv, text, i);
|
||||
} else {
|
||||
// A bare token whose first word matches a tool name suggests the user
|
||||
// forgot the leading `/`. Flag it in error red.
|
||||
if (closed and isKnownSlashName(cmd)) {
|
||||
c.ic_highlight(henv, @intCast(cmd_start), @intCast(cmd.len), style_err.ptr);
|
||||
}
|
||||
// Natural-language prompts still benefit from `$LP_*` highlighting on
|
||||
// any embedded env-var references.
|
||||
// No leading `/`: a natural-language prompt, so no command validation.
|
||||
highlightDollarVars(henv, text, i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user