From 7c035acc6e282cdbaa3b0060a528660fa0dba0d4 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 22 Nov 2026 18:58:26 +0100 Subject: 0.12.1: accept `command` as an alias for `cmd` in bash A field report showed ~40% of bash calls died on a one-word slip (command vs cmd); the alias removes the failure class instead of improving the error for it. --- tests/tools.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/tools.rs') diff --git a/tests/tools.rs b/tests/tools.rs index 4a8176e..0321bf8 100644 --- a/tests/tools.rs +++ b/tests/tools.rs @@ -517,3 +517,16 @@ fn a_pipeline_that_exceeds_the_file_limit_is_reported() { "should report the file limit: {text}" ); } + +#[test] +fn bash_accepts_command_as_an_alias_for_cmd() { + use agent686::tools::validate; + + assert!(validate("bash", &json!({ "command": "ls" })).is_ok()); + assert!(validate("bash", &json!({ "command": " " })).is_err()); + assert!(validate("bash", &json!({})).is_err()); + + let text = run("bash", &json!({ "command": "echo alias-works" })).unwrap(); + assert!(text.contains("alias-works"), "{text}"); + assert!(text.contains("[exit 0]"), "{text}"); +} -- cgit v1.2.3