strands-shell 0.7.0__tar.gz → 0.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (513) hide show
  1. {strands_shell-0.7.0 → strands_shell-0.7.2}/Cargo.lock +10 -9
  2. {strands_shell-0.7.0 → strands_shell-0.7.2}/Cargo.toml +2 -1
  3. {strands_shell-0.7.0 → strands_shell-0.7.2}/PKG-INFO +1 -1
  4. {strands_shell-0.7.0 → strands_shell-0.7.2}/package.json +1 -1
  5. {strands_shell-0.7.0 → strands_shell-0.7.2}/pyproject.toml +1 -1
  6. strands_shell-0.7.2/src/builtins/echo.rs +50 -0
  7. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/mod.rs +2 -1
  8. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/printf.rs +42 -17
  9. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/read.rs +2 -1
  10. strands_shell-0.7.2/src/builtins/test.rs +372 -0
  11. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/cli.rs +32 -0
  12. strands_shell-0.7.2/src/commands/cat.rs +101 -0
  13. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/curl.rs +41 -16
  14. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/head.rs +3 -1
  15. strands_shell-0.7.2/src/commands/mkdir.rs +79 -0
  16. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/tail.rs +7 -8
  17. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/exec.rs +134 -53
  18. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/os.rs +13 -7
  19. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/parser.rs +96 -6
  20. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/shell.rs +2 -2
  21. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/vfs_kernel.rs +290 -36
  22. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/curl_integration.rs +302 -0
  23. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/custom_kernel.rs +1 -1
  24. strands_shell-0.7.2/tests/differential/cases/case_quoted_pattern_is_literal.expected +33 -0
  25. strands_shell-0.7.2/tests/differential/cases/case_quoted_pattern_is_literal.sh +37 -0
  26. strands_shell-0.7.2/tests/differential/cases/cat_continues_past_failing_operand.expected +6 -0
  27. strands_shell-0.7.2/tests/differential/cases/cat_continues_past_failing_operand.sh +5 -0
  28. strands_shell-0.7.2/tests/differential/cases/command_v_redirects.expected +10 -0
  29. strands_shell-0.7.2/tests/differential/cases/command_v_redirects.sh +12 -0
  30. strands_shell-0.7.2/tests/differential/cases/echo_e_hex_unicode_escapes.expected +9 -0
  31. strands_shell-0.7.2/tests/differential/cases/echo_e_hex_unicode_escapes.sh +6 -0
  32. strands_shell-0.7.2/tests/differential/cases/echo_e_octal_high_bytes.expected +8 -0
  33. strands_shell-0.7.2/tests/differential/cases/echo_e_octal_high_bytes.sh +5 -0
  34. strands_shell-0.7.2/tests/differential/cases/echo_plain_keeps_new_escapes_literal.expected +7 -0
  35. strands_shell-0.7.2/tests/differential/cases/echo_plain_keeps_new_escapes_literal.sh +4 -0
  36. strands_shell-0.7.2/tests/differential/cases/exec_expands_args_once.expected +13 -0
  37. strands_shell-0.7.2/tests/differential/cases/exec_expands_args_once.sh +11 -0
  38. strands_shell-0.7.2/tests/differential/cases/mkdir_continues_past_failing_operand.expected +7 -0
  39. strands_shell-0.7.2/tests/differential/cases/mkdir_continues_past_failing_operand.sh +6 -0
  40. strands_shell-0.7.2/tests/differential/cases/pipe_compound_into_compound_edges.expected +16 -0
  41. strands_shell-0.7.2/tests/differential/cases/pipe_compound_into_compound_edges.sh +22 -0
  42. strands_shell-0.7.2/tests/differential/cases/pipe_compound_into_compound_errexit_negated.expected +8 -0
  43. strands_shell-0.7.2/tests/differential/cases/pipe_compound_into_compound_errexit_negated.sh +4 -0
  44. strands_shell-0.7.2/tests/differential/cases/pipe_group_into_each_compound.expected +11 -0
  45. strands_shell-0.7.2/tests/differential/cases/pipe_group_into_each_compound.sh +6 -0
  46. strands_shell-0.7.2/tests/differential/cases/pipe_simple_into_each_compound.expected +11 -0
  47. strands_shell-0.7.2/tests/differential/cases/pipe_simple_into_each_compound.sh +6 -0
  48. strands_shell-0.7.2/tests/differential/cases/pipe_simple_into_two_compounds_heredocs.expected +11 -0
  49. strands_shell-0.7.2/tests/differential/cases/pipe_simple_into_two_compounds_heredocs.sh +12 -0
  50. strands_shell-0.7.2/tests/differential/cases/pipe_subshell_into_each_compound.expected +11 -0
  51. strands_shell-0.7.2/tests/differential/cases/pipe_subshell_into_each_compound.sh +6 -0
  52. strands_shell-0.7.2/tests/differential/cases/pipe_three_stage_compounds.expected +19 -0
  53. strands_shell-0.7.2/tests/differential/cases/pipe_three_stage_compounds.sh +8 -0
  54. strands_shell-0.7.2/tests/differential/cases/prefix_assignment_local.expected +5 -0
  55. strands_shell-0.7.2/tests/differential/cases/prefix_assignment_local.sh +5 -0
  56. strands_shell-0.7.2/tests/differential/cases/prefix_assignment_regular_builtin.expected +8 -0
  57. strands_shell-0.7.2/tests/differential/cases/prefix_assignment_regular_builtin.sh +9 -0
  58. strands_shell-0.7.2/tests/differential/cases/printf_escape_e_and_controls.expected +8 -0
  59. strands_shell-0.7.2/tests/differential/cases/printf_escape_e_and_controls.sh +5 -0
  60. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/read_ifs_fields.sh +0 -1
  61. strands_shell-0.7.2/tests/differential/cases/set_e_break_out_of_tested_body.sh +4 -0
  62. strands_shell-0.7.2/tests/differential/cases/set_e_child_sh_in_tested_context.expected +8 -0
  63. strands_shell-0.7.2/tests/differential/cases/set_e_child_sh_in_tested_context.sh +6 -0
  64. strands_shell-0.7.2/tests/differential/cases/set_e_child_sh_in_tested_function.expected +11 -0
  65. strands_shell-0.7.2/tests/differential/cases/set_e_child_sh_in_tested_function.sh +7 -0
  66. strands_shell-0.7.2/tests/differential/cases/set_e_fires_in_last_of_and_list.sh +4 -0
  67. strands_shell-0.7.2/tests/differential/cases/set_e_fires_in_untested_function.expected +3 -0
  68. strands_shell-0.7.2/tests/differential/cases/set_e_fires_in_untested_function.sh +4 -0
  69. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_and_body.expected +12 -0
  70. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_and_body.sh +7 -0
  71. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_captured_body.expected +12 -0
  72. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_captured_body.sh +9 -0
  73. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_if_body.expected +14 -0
  74. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_if_body.sh +9 -0
  75. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_negated_body.expected +8 -0
  76. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_negated_body.sh +7 -0
  77. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_or_body.expected +8 -0
  78. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_or_body.sh +7 -0
  79. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_sourced_body.expected +7 -0
  80. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_in_sourced_body.sh +5 -0
  81. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_nested_tested_call.expected +7 -0
  82. strands_shell-0.7.2/tests/differential/cases/set_e_ignored_nested_tested_call.sh +7 -0
  83. strands_shell-0.7.2/tests/differential/cases/set_e_subshell_exit.expected +3 -0
  84. strands_shell-0.7.2/tests/differential/cases/sh_c_parent_keeps_its_errexit.expected +3 -0
  85. strands_shell-0.7.2/tests/differential/cases/tail_n_invalid_count.expected +6 -0
  86. strands_shell-0.7.2/tests/differential/cases/tail_n_invalid_count.sh +9 -0
  87. strands_shell-0.7.2/tests/differential/cases/tail_n_minus_count.expected +8 -0
  88. strands_shell-0.7.2/tests/differential/cases/tail_n_minus_count.sh +5 -0
  89. strands_shell-0.7.2/tests/differential/cases/tail_n_repeated.expected +8 -0
  90. strands_shell-0.7.2/tests/differential/cases/tail_n_repeated.sh +5 -0
  91. strands_shell-0.7.2/tests/differential/cases/test_binary_operator_without_right_operand.expected +11 -0
  92. strands_shell-0.7.2/tests/differential/cases/test_binary_operator_without_right_operand.sh +8 -0
  93. strands_shell-0.7.2/tests/differential/cases/test_closing_bracket_as_operand.expected +15 -0
  94. strands_shell-0.7.2/tests/differential/cases/test_closing_bracket_as_operand.sh +14 -0
  95. strands_shell-0.7.2/tests/differential/cases/test_integer_operand_invalid.expected +17 -0
  96. strands_shell-0.7.2/tests/differential/cases/test_integer_operand_invalid.sh +17 -0
  97. strands_shell-0.7.2/tests/differential/cases/test_integer_operand_valid.expected +15 -0
  98. strands_shell-0.7.2/tests/differential/cases/test_integer_operand_valid.sh +12 -0
  99. strands_shell-0.7.2/tests/differential/cases/test_paren_operator_as_operand.expected +21 -0
  100. strands_shell-0.7.2/tests/differential/cases/test_paren_operator_as_operand.sh +19 -0
  101. strands_shell-0.7.2/tests/differential/cases/test_trailing_binary_operator_in_expression.expected +6 -0
  102. strands_shell-0.7.2/tests/differential/cases/test_trailing_binary_operator_in_expression.sh +3 -0
  103. strands_shell-0.7.2/tests/differential/cases/test_valid_expressions_stay_quiet.expected +12 -0
  104. strands_shell-0.7.2/tests/differential/cases/test_valid_expressions_stay_quiet.sh +9 -0
  105. strands_shell-0.7.2/tests/differential/cases/while_read_medium_file.expected +9 -0
  106. strands_shell-0.7.2/tests/differential/cases/while_read_medium_file.sh +16 -0
  107. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/shell_integration.rs +188 -0
  108. strands_shell-0.7.0/src/builtins/echo.rs +0 -97
  109. strands_shell-0.7.0/src/builtins/test.rs +0 -247
  110. strands_shell-0.7.0/src/commands/cat.rs +0 -64
  111. strands_shell-0.7.0/src/commands/mkdir.rs +0 -65
  112. {strands_shell-0.7.0 → strands_shell-0.7.2}/.cargo/config.toml +0 -0
  113. {strands_shell-0.7.0 → strands_shell-0.7.2}/.gitattributes +0 -0
  114. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  115. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  116. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  117. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  118. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/actions/stamp-version/action.yml +0 -0
  119. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/dependabot.yml +0 -0
  120. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/labelers/language.yml +0 -0
  121. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/labelers/type.yml +0 -0
  122. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/scripts/group-release-notes.py +0 -0
  123. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/workflows/auto-close.yml +0 -0
  124. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/workflows/bot-pr-review-gate.yml +0 -0
  125. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/workflows/ci.yml +0 -0
  126. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/workflows/issue-labeler.yml +0 -0
  127. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/workflows/pr-title.yml +0 -0
  128. {strands_shell-0.7.0 → strands_shell-0.7.2}/.github/workflows/release.yml +0 -0
  129. {strands_shell-0.7.0 → strands_shell-0.7.2}/.gitignore +0 -0
  130. {strands_shell-0.7.0 → strands_shell-0.7.2}/AGENTS.md +0 -0
  131. {strands_shell-0.7.0 → strands_shell-0.7.2}/CODE_OF_CONDUCT.md +0 -0
  132. {strands_shell-0.7.0 → strands_shell-0.7.2}/CONTRIBUTING.md +0 -0
  133. {strands_shell-0.7.0 → strands_shell-0.7.2}/LICENSE +0 -0
  134. {strands_shell-0.7.0 → strands_shell-0.7.2}/NOTICE +0 -0
  135. {strands_shell-0.7.0 → strands_shell-0.7.2}/README.md +0 -0
  136. {strands_shell-0.7.0 → strands_shell-0.7.2}/SECURITY.md +0 -0
  137. {strands_shell-0.7.0 → strands_shell-0.7.2}/build.rs +0 -0
  138. {strands_shell-0.7.0 → strands_shell-0.7.2}/index.d.ts +0 -0
  139. {strands_shell-0.7.0 → strands_shell-0.7.2}/index.js +0 -0
  140. {strands_shell-0.7.0 → strands_shell-0.7.2}/python/strands_shell/__init__.py +0 -0
  141. {strands_shell-0.7.0 → strands_shell-0.7.2}/scripts/build-wasm.sh +0 -0
  142. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/alias.rs +0 -0
  143. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/builtin.rs +0 -0
  144. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/cd.rs +0 -0
  145. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/colon.rs +0 -0
  146. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/export.rs +0 -0
  147. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/find.rs +0 -0
  148. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/getopts.rs +0 -0
  149. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/hash.rs +0 -0
  150. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/local.rs +0 -0
  151. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/lua.rs +0 -0
  152. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/lua_pattern.rs +0 -0
  153. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/pwd.rs +0 -0
  154. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/set.rs +0 -0
  155. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/shift.rs +0 -0
  156. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/shopt.rs +0 -0
  157. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/trap.rs +0 -0
  158. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/type_cmd.rs +0 -0
  159. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/umask.rs +0 -0
  160. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/unset.rs +0 -0
  161. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/wait.rs +0 -0
  162. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/which.rs +0 -0
  163. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/builtins/xargs.rs +0 -0
  164. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/command_fallback.rs +0 -0
  165. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/base64.rs +0 -0
  166. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/basename.rs +0 -0
  167. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/chmod.rs +0 -0
  168. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/cp.rs +0 -0
  169. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/cut.rs +0 -0
  170. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/date.rs +0 -0
  171. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/dirname.rs +0 -0
  172. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/echo.rs +0 -0
  173. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/env.rs +0 -0
  174. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/false.rs +0 -0
  175. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/grep.rs +0 -0
  176. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/id.rs +0 -0
  177. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/jq.rs +0 -0
  178. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/ln.rs +0 -0
  179. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/ls.rs +0 -0
  180. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/mktemp.rs +0 -0
  181. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/mod.rs +0 -0
  182. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/mv.rs +0 -0
  183. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/pwd.rs +0 -0
  184. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/readlink.rs +0 -0
  185. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/rm.rs +0 -0
  186. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/rmdir.rs +0 -0
  187. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/sed.rs +0 -0
  188. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/sleep.rs +0 -0
  189. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/sort.rs +0 -0
  190. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/tee.rs +0 -0
  191. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/touch.rs +0 -0
  192. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/tr.rs +0 -0
  193. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/true.rs +0 -0
  194. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/uname.rs +0 -0
  195. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/uniq.rs +0 -0
  196. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/wc.rs +0 -0
  197. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/commands/whoami.rs +0 -0
  198. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/io.rs +0 -0
  199. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/js.rs +0 -0
  200. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/lib.rs +0 -0
  201. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/main.rs +0 -0
  202. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/mcp.rs +0 -0
  203. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/mcp_client.rs +0 -0
  204. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/prelude.rs +0 -0
  205. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/python.rs +0 -0
  206. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/vfs.rs +0 -0
  207. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/vfs_config.rs +0 -0
  208. {strands_shell-0.7.0 → strands_shell-0.7.2}/src/wasm_main.rs +0 -0
  209. {strands_shell-0.7.0 → strands_shell-0.7.2}/strands-shell-macros/Cargo.toml +0 -0
  210. {strands_shell-0.7.0 → strands_shell-0.7.2}/strands-shell-macros/src/lib.rs +0 -0
  211. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/claude_code_preamble.rs +0 -0
  212. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/command_check.rs +0 -0
  213. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/command_fallback.rs +0 -0
  214. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/command_registry.rs +0 -0
  215. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/config.rs +0 -0
  216. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/date_fixed_clock.rs +0 -0
  217. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/README.md +0 -0
  218. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/and_or_chain.expected +0 -0
  219. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/and_or_chain.sh +0 -0
  220. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/args_at_vs_star.expected +0 -0
  221. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/args_at_vs_star.sh +0 -0
  222. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/arithmetic.expected +0 -0
  223. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/arithmetic.sh +0 -0
  224. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/arithmetic_compare_and_logic.expected +0 -0
  225. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/arithmetic_compare_and_logic.sh +0 -0
  226. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/arithmetic_division_by_zero.expected +0 -0
  227. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/arithmetic_division_by_zero.sh +0 -0
  228. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_decode.expected +0 -0
  229. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_decode.sh +0 -0
  230. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_decode_invalid.expected +0 -0
  231. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_decode_invalid.sh +0 -0
  232. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_encode.expected +0 -0
  233. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_encode.sh +0 -0
  234. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_missing_file.expected +0 -0
  235. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/base64_missing_file.sh +0 -0
  236. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/basename_dirname.expected +0 -0
  237. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/basename_dirname.sh +0 -0
  238. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/case_glob_and_fallthrough.expected +0 -0
  239. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/case_glob_and_fallthrough.sh +0 -0
  240. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/case_statement.expected +0 -0
  241. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/case_statement.sh +0 -0
  242. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cat_multiple_files.expected +0 -0
  243. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cat_multiple_files.sh +0 -0
  244. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cmdsub_exit_status.expected +0 -0
  245. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cmdsub_exit_status.sh +0 -0
  246. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cmdsub_nested_quotes.expected +0 -0
  247. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cmdsub_nested_quotes.sh +0 -0
  248. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cmdsub_trailing_newlines_stripped.expected +0 -0
  249. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cmdsub_trailing_newlines_stripped.sh +0 -0
  250. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_not_found.expected +0 -0
  251. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_not_found.sh +0 -0
  252. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_skips_function.expected +0 -0
  253. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_skips_function.sh +0 -0
  254. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_stage_streams.expected +0 -0
  255. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_stage_streams.sh +0 -0
  256. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_substitution.expected +0 -0
  257. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_substitution.sh +0 -0
  258. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_v_hash_and_path.expected +0 -0
  259. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_v_hash_and_path.sh +0 -0
  260. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_v_slash_name.expected +0 -0
  261. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_v_slash_name.sh +0 -0
  262. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_v_unset_path.expected +0 -0
  263. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/command_v_unset_path.sh +0 -0
  264. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/compound_pipe_into_function.expected +0 -0
  265. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/compound_pipe_into_function.sh +0 -0
  266. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cp_recursive.expected +0 -0
  267. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cp_recursive.sh +0 -0
  268. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/crlf_output.expected +0 -0
  269. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/crlf_output.sh +0 -0
  270. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cut_characters.expected +0 -0
  271. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cut_characters.sh +0 -0
  272. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cut_tr.expected +0 -0
  273. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/cut_tr.sh +0 -0
  274. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/double_bracket.expected +0 -0
  275. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/double_bracket.sh +0 -0
  276. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/double_bracket_alias.expected +0 -0
  277. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/double_bracket_alias.sh +0 -0
  278. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/echo_backslash_literal.expected +0 -0
  279. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/echo_backslash_literal.sh +0 -0
  280. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/echo_e.expected +0 -0
  281. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/echo_e.sh +0 -0
  282. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/echo_n_flag.expected +0 -0
  283. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/echo_n_flag.sh +0 -0
  284. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/empty_command_name.expected +0 -0
  285. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/empty_command_name.sh +0 -0
  286. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/empty_path.expected +0 -0
  287. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/empty_path.sh +0 -0
  288. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/executor_builtins_in_pipeline.expected +0 -0
  289. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/executor_builtins_in_pipeline.sh +0 -0
  290. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/exit_status.expected +0 -0
  291. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/exit_status.sh +0 -0
  292. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/export_attributes.expected +0 -0
  293. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/export_attributes.sh +0 -0
  294. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/export_hidden_from_children.expected +0 -0
  295. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/export_hidden_from_children.sh +0 -0
  296. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/export_visibility.expected +0 -0
  297. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/export_visibility.sh +0 -0
  298. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_basic.expected +0 -0
  299. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_basic.sh +0 -0
  300. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_empty.expected +0 -0
  301. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_empty.sh +0 -0
  302. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_exec.expected +0 -0
  303. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_exec.sh +0 -0
  304. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_missing_start.expected +0 -0
  305. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_missing_start.sh +0 -0
  306. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_trailing_slash.expected +0 -0
  307. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/find_trailing_slash.sh +0 -0
  308. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/for_loop.expected +0 -0
  309. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/for_loop.sh +0 -0
  310. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/function_local_scope.expected +0 -0
  311. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/function_local_scope.sh +0 -0
  312. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/function_shadows_builtin.expected +0 -0
  313. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/function_shadows_builtin.sh +0 -0
  314. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/functions.expected +0 -0
  315. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/functions.sh +0 -0
  316. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/glob_expansion.expected +0 -0
  317. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/glob_expansion.sh +0 -0
  318. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/glob_question_and_class.expected +0 -0
  319. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/glob_question_and_class.sh +0 -0
  320. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_basic.expected +0 -0
  321. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_basic.sh +0 -0
  322. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_files_with_matches.expected +0 -0
  323. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_files_with_matches.sh +0 -0
  324. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_multiple_files_prefix.expected +0 -0
  325. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_multiple_files_prefix.sh +0 -0
  326. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_only_matching.expected +0 -0
  327. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_only_matching.sh +0 -0
  328. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_recursive.expected +0 -0
  329. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_recursive.sh +0 -0
  330. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_word_and_fixed.expected +0 -0
  331. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/grep_word_and_fixed.sh +0 -0
  332. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/hash_in_word.expected +0 -0
  333. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/hash_in_word.sh +0 -0
  334. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/head_tail.expected +0 -0
  335. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/head_tail.sh +0 -0
  336. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/head_tail_bytes.expected +0 -0
  337. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/head_tail_bytes.sh +0 -0
  338. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/here_string.expected +0 -0
  339. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/here_string.sh +0 -0
  340. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc.expected +0 -0
  341. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc.sh +0 -0
  342. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_commands.expected +0 -0
  343. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_commands.sh +0 -0
  344. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_followed_by_lines.expected +0 -0
  345. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_followed_by_lines.sh +0 -0
  346. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_keyword_delimiter.expected +0 -0
  347. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_keyword_delimiter.sh +0 -0
  348. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_variants.expected +0 -0
  349. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_inside_compound_variants.sh +0 -0
  350. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_quoted_delimiter_variants.expected +0 -0
  351. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/heredoc_quoted_delimiter_variants.sh +0 -0
  352. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/if_elif_else.expected +0 -0
  353. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/if_elif_else.sh +0 -0
  354. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/ifs_custom_split.expected +0 -0
  355. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/ifs_custom_split.sh +0 -0
  356. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_basic.expected +0 -0
  357. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_basic.sh +0 -0
  358. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_invalid_json.expected +0 -0
  359. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_invalid_json.sh +0 -0
  360. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_missing_key_null.expected +0 -0
  361. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_missing_key_null.sh +0 -0
  362. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_select_filter.expected +0 -0
  363. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/jq_select_filter.sh +0 -0
  364. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/local_without_value.expected +0 -0
  365. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/local_without_value.sh +0 -0
  366. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/loop_break_continue.expected +0 -0
  367. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/loop_break_continue.sh +0 -0
  368. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/loop_nested_break_n.expected +0 -0
  369. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/loop_nested_break_n.sh +0 -0
  370. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/loop_while_read_file_fields.expected +0 -0
  371. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/loop_while_read_file_fields.sh +0 -0
  372. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/ls_created_files.expected +0 -0
  373. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/ls_created_files.sh +0 -0
  374. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/missing_file.expected +0 -0
  375. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/missing_file.sh +0 -0
  376. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/mkdir_cp_mv_rm.expected +0 -0
  377. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/mkdir_cp_mv_rm.sh +0 -0
  378. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/param_default_assign.expected +0 -0
  379. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/param_default_assign.sh +0 -0
  380. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/param_error_unset.expected +0 -0
  381. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/param_error_unset.sh +0 -0
  382. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/parameter_expansion.expected +0 -0
  383. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/parameter_expansion.sh +0 -0
  384. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/pipe_into_while_read.expected +0 -0
  385. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/pipe_into_while_read.sh +0 -0
  386. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/pipeline_sort_uniq.expected +0 -0
  387. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/pipeline_sort_uniq.sh +0 -0
  388. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/pipeline_status.expected +0 -0
  389. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/pipeline_status.sh +0 -0
  390. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/positional_shift.expected +0 -0
  391. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/positional_shift.sh +0 -0
  392. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_basic.expected +0 -0
  393. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_basic.sh +0 -0
  394. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_number_formats.expected +0 -0
  395. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_number_formats.sh +0 -0
  396. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_percent_and_escapes.expected +0 -0
  397. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_percent_and_escapes.sh +0 -0
  398. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_reuses_format.expected +0 -0
  399. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_reuses_format.sh +0 -0
  400. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_zero_pad.expected +0 -0
  401. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/printf_zero_pad.sh +0 -0
  402. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/quote_backslash_in_double.expected +0 -0
  403. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/quote_backslash_in_double.sh +0 -0
  404. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/quote_empty_args.expected +0 -0
  405. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/quote_empty_args.sh +0 -0
  406. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/quoting.expected +0 -0
  407. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/quoting.sh +0 -0
  408. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/read_ifs_fields.expected +0 -0
  409. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/read_raw_backslash.expected +0 -0
  410. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/read_raw_backslash.sh +0 -0
  411. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_both_ampersand.expected +0 -0
  412. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_both_ampersand.sh +0 -0
  413. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_digit_word.expected +0 -0
  414. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_digit_word.sh +0 -0
  415. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_order_matters.expected +0 -0
  416. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_order_matters.sh +0 -0
  417. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_overwrite_append.expected +0 -0
  418. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_overwrite_append.sh +0 -0
  419. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stderr_devnull.expected +0 -0
  420. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stderr_devnull.sh +0 -0
  421. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stderr_to_file.expected +0 -0
  422. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stderr_to_file.sh +0 -0
  423. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stderr_to_stdout.expected +0 -0
  424. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stderr_to_stdout.sh +0 -0
  425. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stdin.expected +0 -0
  426. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/redirect_stdin.sh +0 -0
  427. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/rm_missing_file.expected +0 -0
  428. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/rm_missing_file.sh +0 -0
  429. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_addresses_and_delete.expected +0 -0
  430. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_addresses_and_delete.sh +0 -0
  431. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_basic.expected +0 -0
  432. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_basic.sh +0 -0
  433. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_bre_literals.expected +0 -0
  434. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_bre_literals.sh +0 -0
  435. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_global_and_delimiter.expected +0 -0
  436. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sed_global_and_delimiter.sh +0 -0
  437. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e.expected +0 -0
  438. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e.sh +0 -0
  439. /strands_shell-0.7.0/tests/differential/cases/set_e_subshell_exit.expected → /strands_shell-0.7.2/tests/differential/cases/set_e_break_out_of_tested_body.expected +0 -0
  440. /strands_shell-0.7.0/tests/differential/cases/sh_c_parent_keeps_its_errexit.expected → /strands_shell-0.7.2/tests/differential/cases/set_e_fires_in_last_of_and_list.expected +0 -0
  441. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e_function_pipeline_stage.expected +0 -0
  442. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e_function_pipeline_stage.sh +0 -0
  443. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e_in_condition.expected +0 -0
  444. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e_in_condition.sh +0 -0
  445. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_e_subshell_exit.sh +0 -0
  446. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_u_unset_variable.expected +0 -0
  447. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/set_u_unset_variable.sh +0 -0
  448. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_errexit_not_inherited.expected +0 -0
  449. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_errexit_not_inherited.sh +0 -0
  450. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_negated_child_keeps_its_errexit.expected +0 -0
  451. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_negated_child_keeps_its_errexit.sh +0 -0
  452. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_nounset_not_inherited.expected +0 -0
  453. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_nounset_not_inherited.sh +0 -0
  454. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_parent_keeps_its_errexit.sh +0 -0
  455. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_pipefail_not_inherited.expected +0 -0
  456. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_pipefail_not_inherited.sh +0 -0
  457. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_xtrace_not_inherited.expected +0 -0
  458. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_c_xtrace_not_inherited.sh +0 -0
  459. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_dash_c.expected +0 -0
  460. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_dash_c.sh +0 -0
  461. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_script_errexit_not_inherited.expected +0 -0
  462. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sh_script_errexit_not_inherited.sh +0 -0
  463. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sort_numeric_prefix.expected +0 -0
  464. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sort_numeric_prefix.sh +0 -0
  465. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sort_options.expected +0 -0
  466. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sort_options.sh +0 -0
  467. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sort_reverse_unique_key.expected +0 -0
  468. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/sort_reverse_unique_key.sh +0 -0
  469. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/source_and_or_line_end.expected +0 -0
  470. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/source_and_or_line_end.sh +0 -0
  471. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/subshell_cd_isolation.expected +0 -0
  472. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/subshell_cd_isolation.sh +0 -0
  473. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/subshell_isolation.expected +0 -0
  474. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/subshell_isolation.sh +0 -0
  475. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/test_conditions.expected +0 -0
  476. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/test_conditions.sh +0 -0
  477. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/test_symlink_flags.expected +0 -0
  478. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/test_symlink_flags.sh +0 -0
  479. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/touch_times.expected +0 -0
  480. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/touch_times.sh +0 -0
  481. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/tr_ranges_and_delete.expected +0 -0
  482. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/tr_ranges_and_delete.sh +0 -0
  483. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/uniq_dup_and_count.expected +0 -0
  484. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/uniq_dup_and_count.sh +0 -0
  485. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/wc_counts.expected +0 -0
  486. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/wc_counts.sh +0 -0
  487. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/while_loop.expected +0 -0
  488. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/while_loop.sh +0 -0
  489. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/word_splitting_unquoted.expected +0 -0
  490. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/word_splitting_unquoted.sh +0 -0
  491. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/xargs_basic.expected +0 -0
  492. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/xargs_basic.sh +0 -0
  493. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/xargs_n1.expected +0 -0
  494. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/xargs_n1.sh +0 -0
  495. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/xargs_with_grep.expected +0 -0
  496. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential/cases/xargs_with_grep.sh +0 -0
  497. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/differential.rs +0 -0
  498. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/fixtures/claude-code-snapshot-script.sh +0 -0
  499. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/js/test_bindings.mjs +0 -0
  500. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/js/test_builder.mjs +0 -0
  501. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/js/test_config.mjs +0 -0
  502. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/lookup_and_env.rs +0 -0
  503. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/lua_integration.rs +0 -0
  504. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/mcp_integration.rs +0 -0
  505. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/path_resolution_cost.rs +0 -0
  506. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/python/test_api.py +0 -0
  507. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/python/test_bindings.py +0 -0
  508. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/python/test_builder.py +0 -0
  509. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/python/test_config.py +0 -0
  510. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/touch_times.rs +0 -0
  511. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/ts/api.types.ts +0 -0
  512. {strands_shell-0.7.0 → strands_shell-0.7.2}/tests/vfs_unit.rs +0 -0
  513. {strands_shell-0.7.0 → strands_shell-0.7.2}/tsconfig.json +0 -0
@@ -181,9 +181,9 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
181
181
 
182
182
  [[package]]
183
183
  name = "bytes"
184
- version = "1.12.1"
184
+ version = "1.12.2"
185
185
  source = "registry+https://github.com/rust-lang/crates.io-index"
186
- checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
186
+ checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c"
187
187
 
188
188
  [[package]]
189
189
  name = "cc"
@@ -1320,9 +1320,9 @@ dependencies = [
1320
1320
 
1321
1321
  [[package]]
1322
1322
  name = "regex"
1323
- version = "1.13.1"
1323
+ version = "1.13.2"
1324
1324
  source = "registry+https://github.com/rust-lang/crates.io-index"
1325
- checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
1325
+ checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857"
1326
1326
  dependencies = [
1327
1327
  "aho-corasick",
1328
1328
  "memchr",
@@ -1332,9 +1332,9 @@ dependencies = [
1332
1332
 
1333
1333
  [[package]]
1334
1334
  name = "regex-automata"
1335
- version = "0.4.16"
1335
+ version = "0.4.19"
1336
1336
  source = "registry+https://github.com/rust-lang/crates.io-index"
1337
- checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
1337
+ checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158"
1338
1338
  dependencies = [
1339
1339
  "aho-corasick",
1340
1340
  "memchr",
@@ -1349,9 +1349,9 @@ checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973"
1349
1349
 
1350
1350
  [[package]]
1351
1351
  name = "regex-syntax"
1352
- version = "0.8.11"
1352
+ version = "0.8.12"
1353
1353
  source = "registry+https://github.com/rust-lang/crates.io-index"
1354
- checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
1354
+ checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6"
1355
1355
 
1356
1356
  [[package]]
1357
1357
  name = "reqwest"
@@ -1611,7 +1611,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
1611
1611
 
1612
1612
  [[package]]
1613
1613
  name = "strands-shell"
1614
- version = "0.7.0"
1614
+ version = "0.7.2"
1615
1615
  dependencies = [
1616
1616
  "async-trait",
1617
1617
  "axum",
@@ -1628,6 +1628,7 @@ dependencies = [
1628
1628
  "napi",
1629
1629
  "napi-build",
1630
1630
  "napi-derive",
1631
+ "percent-encoding",
1631
1632
  "pyo3",
1632
1633
  "regex",
1633
1634
  "reqwest",
@@ -2,7 +2,7 @@
2
2
  name = "strands-shell"
3
3
  # Placeholder — the real version comes from the release git tag, stamped at
4
4
  # build time by .github/actions/stamp-version. Do not bump this by hand.
5
- version = "0.7.0"
5
+ version = "0.7.2"
6
6
  edition = "2024"
7
7
  description = "A virtual shell sandbox for AI agents"
8
8
  license = "Apache-2.0"
@@ -44,6 +44,7 @@ serde = { version = "1", features = ["derive"] }
44
44
  serde_json = "1"
45
45
  toml = "1"
46
46
  url = "2"
47
+ percent-encoding = "2"
47
48
  jaq-core = "2"
48
49
  jaq-std = { version = "2", features = ["format", "log", "math", "regex", "time", "std"] }
49
50
  jaq-json = { version = "1", features = ["serde_json"] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strands-shell
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands-agents/shell",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Strands Shell — a virtual shell sandbox for AI agents (Node.js bindings)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -6,7 +6,7 @@ build-backend = "maturin"
6
6
  name = "strands-shell"
7
7
  # Placeholder — the real version comes from the release git tag, stamped at
8
8
  # build time by .github/actions/stamp-version. Do not bump this by hand.
9
- version = "0.7.0"
9
+ version = "0.7.2"
10
10
  description = "A virtual shell for AI agents"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.10"
@@ -0,0 +1,50 @@
1
+ use std::future::Future;
2
+ use std::pin::Pin;
3
+
4
+ use super::printf::{Escapes, Out, escape_all};
5
+ use crate::commands::CommandResult;
6
+ use crate::os::{Kernel, Process};
7
+ use crate::prelude::*;
8
+
9
+ pub fn builtin_echo<'a>(
10
+ _os: &'a dyn Kernel,
11
+ _proc: &'a mut Process,
12
+ args: &'a [String],
13
+ ) -> Pin<Box<dyn Future<Output = CommandResult> + 'a>> {
14
+ Box::pin(async move {
15
+ let mut start = 0;
16
+ let mut newline = true;
17
+ let mut escapes = Some(Escapes::PlainEcho);
18
+
19
+ // Like bash, leading words made only of the letters n, e and E are
20
+ // options; anything else (e.g. `-x`, `--`, `-`) is printed literally.
21
+ while let Some(flags) = args.get(start).and_then(|a| a.strip_prefix('-')) {
22
+ if flags.is_empty() || !flags.chars().all(|c| matches!(c, 'n' | 'e' | 'E')) {
23
+ break;
24
+ }
25
+ for c in flags.chars() {
26
+ match c {
27
+ 'n' => newline = false,
28
+ 'e' => escapes = Some(Escapes::Echo),
29
+ _ => escapes = None,
30
+ }
31
+ }
32
+ start += 1;
33
+ }
34
+
35
+ let text = args[start..].join(" ");
36
+ let mut out = Out::default();
37
+ if let Some(mode) = escapes {
38
+ if escape_all(&text, mode, &mut out) {
39
+ newline = false;
40
+ }
41
+ } else {
42
+ out.push_str(&text);
43
+ }
44
+ if newline {
45
+ out.push('\n');
46
+ }
47
+ io::stdout()?.write_all(&out.0).await?;
48
+ Ok(0)
49
+ })
50
+ }
@@ -65,7 +65,8 @@ pub fn lookup(name: &str) -> Option<BuiltinFn> {
65
65
  "set" => Some(set::builtin_set),
66
66
  "shift" => Some(shift::builtin_shift),
67
67
  "shopt" => Some(shopt::builtin_shopt),
68
- "test" | "[" => Some(test::builtin_test),
68
+ "test" => Some(test::builtin_test),
69
+ "[" => Some(test::builtin_bracket),
69
70
  "trap" => Some(trap::builtin_trap),
70
71
  "type" => Some(type_cmd::builtin_type),
71
72
  "umask" => Some(umask::builtin_umask),
@@ -25,17 +25,17 @@ pub fn builtin_printf<'a>(
25
25
  })
26
26
  }
27
27
 
28
- /// printf output: raw bytes, since `\xHH` and octal escapes can emit
29
- /// bytes that are not valid UTF-8.
28
+ /// printf and echo output: raw bytes, since `\xHH` and octal escapes
29
+ /// can emit bytes that are not valid UTF-8.
30
30
  #[derive(Default)]
31
- struct Out(Vec<u8>);
31
+ pub(crate) struct Out(pub(crate) Vec<u8>);
32
32
 
33
33
  impl Out {
34
- fn push(&mut self, c: char) {
34
+ pub(crate) fn push(&mut self, c: char) {
35
35
  self.0
36
36
  .extend_from_slice(c.encode_utf8(&mut [0; 4]).as_bytes());
37
37
  }
38
- fn push_str(&mut self, s: &str) {
38
+ pub(crate) fn push_str(&mut self, s: &str) {
39
39
  self.0.extend_from_slice(s.as_bytes());
40
40
  }
41
41
  }
@@ -50,7 +50,7 @@ fn format_string(fmt: &str, params: &[String]) -> Vec<u8> {
50
50
 
51
51
  while let Some(c) = chars.next() {
52
52
  if c == '\\' {
53
- escape(&mut chars, false, &mut out);
53
+ escape(&mut chars, Escapes::Format, &mut out);
54
54
  } else if c == '%' {
55
55
  match chars.peek() {
56
56
  Some('%') => {
@@ -165,7 +165,7 @@ fn format_string(fmt: &str, params: &[String]) -> Vec<u8> {
165
165
  'b' => {
166
166
  // %b — interpret backslash escapes in the argument;
167
167
  // `\c` stops all further output.
168
- if escape_all(param, &mut out) {
168
+ if escape_all(param, Escapes::B, &mut out) {
169
169
  return out.0;
170
170
  }
171
171
  }
@@ -368,13 +368,29 @@ fn general(a: f64, p: usize, alt: bool) -> String {
368
368
  format!("{mantissa}{exp}")
369
369
  }
370
370
 
371
- /// Expand every backslash escape in a `%b` argument. Returns true on `\c`.
372
- fn escape_all(s: &str, out: &mut Out) -> bool {
371
+ /// Which rules backslash escapes follow.
372
+ #[derive(Clone, Copy, PartialEq)]
373
+ pub(crate) enum Escapes {
374
+ /// A printf format string.
375
+ Format,
376
+ /// A `%b` argument: `\0` takes up to three more octal digits and `\c`
377
+ /// stops output.
378
+ B,
379
+ /// `echo -e`: like `%b`, but an octal escape must start with `\0`.
380
+ Echo,
381
+ /// `echo` with neither `-e` nor `-E`: like `Echo`, but `\x`, `\u`,
382
+ /// `\U`, `\e` and `\E` stay literal. bash expands nothing here; this
383
+ /// keeps the escapes plain echo expanded before #336.
384
+ PlainEcho,
385
+ }
386
+
387
+ /// Expand every backslash escape in `s`. Returns true on `\c`.
388
+ pub(crate) fn escape_all(s: &str, mode: Escapes, out: &mut Out) -> bool {
373
389
  let mut chars = s.chars().peekable();
374
390
  while let Some(c) = chars.next() {
375
391
  if c != '\\' {
376
392
  out.push(c);
377
- } else if escape(&mut chars, true, out) {
393
+ } else if escape(&mut chars, mode, out) {
378
394
  return true;
379
395
  }
380
396
  }
@@ -382,9 +398,8 @@ fn escape_all(s: &str, out: &mut Out) -> bool {
382
398
  }
383
399
 
384
400
  /// Interpret one escape, `chars` positioned just after the backslash, the
385
- /// way bash's printf does. `in_b` selects `%b` rules: `\0` takes up to
386
- /// three more octal digits and `\c` stops output (returns true).
387
- fn escape(chars: &mut Peekable<Chars<'_>>, in_b: bool, out: &mut Out) -> bool {
401
+ /// way bash's printf and echo do. Returns true on a `\c` that stops output.
402
+ fn escape(chars: &mut Peekable<Chars<'_>>, mode: Escapes, out: &mut Out) -> bool {
388
403
  let Some(c) = chars.next() else {
389
404
  out.push('\\');
390
405
  return false;
@@ -393,11 +408,21 @@ fn escape(chars: &mut Peekable<Chars<'_>>, in_b: bool, out: &mut Out) -> bool {
393
408
  'n' => out.push('\n'),
394
409
  't' => out.push('\t'),
395
410
  'r' => out.push('\r'),
411
+ 'a' => out.push('\x07'),
412
+ 'b' => out.push('\x08'),
413
+ 'f' => out.push('\x0c'),
414
+ 'v' => out.push('\x0b'),
415
+ 'e' | 'E' if mode != Escapes::PlainEcho => out.push('\x1b'),
396
416
  '\\' => out.push('\\'),
397
- 'c' if in_b => return true,
398
- '0'..='7' => {
417
+ 'c' if mode != Escapes::Format => return true,
418
+ '0'..='7' if c == '0' || matches!(mode, Escapes::Format | Escapes::B) => {
399
419
  let mut val = c as u32 - '0' as u32;
400
- let more = if in_b && c == '0' { 3 } else { 2 };
420
+ // `\0` in `%b` and echo takes up to three more digits.
421
+ let more = if mode == Escapes::Format || c != '0' {
422
+ 2
423
+ } else {
424
+ 3
425
+ };
401
426
  for _ in 0..more {
402
427
  match chars.peek().and_then(|d| d.to_digit(8)) {
403
428
  Some(d) => {
@@ -409,7 +434,7 @@ fn escape(chars: &mut Peekable<Chars<'_>>, in_b: bool, out: &mut Out) -> bool {
409
434
  }
410
435
  out.0.push(val as u8); // bash keeps the low byte: `\400` is NUL
411
436
  }
412
- 'x' | 'u' | 'U' => {
437
+ 'x' | 'u' | 'U' if mode != Escapes::PlainEcho => {
413
438
  let max = match c {
414
439
  'x' => 2,
415
440
  'u' => 4,
@@ -109,7 +109,8 @@ pub fn builtin_read<'a>(
109
109
  Err(e) if e.kind() == std::io::ErrorKind::TimedOut => {
110
110
  let mut kind = reader.into_fd_kind();
111
111
  if let crate::os::FdKind::ChannelReader { buf, .. } = &mut kind {
112
- buf.splice(0..0, bytes.iter().copied());
112
+ bytes.extend_from_slice(buf);
113
+ *buf = bytes.into();
113
114
  }
114
115
  io::with_process(|p| p.restore_fd(0, kind));
115
116
  return Err(e.into());
@@ -0,0 +1,372 @@
1
+ use std::future::Future;
2
+ use std::pin::Pin;
3
+
4
+ use crate::commands::CommandResult;
5
+ use crate::os::{ACCESS_R, ACCESS_W, ACCESS_X, Kernel, Process};
6
+
7
+ pub fn builtin_test<'a>(
8
+ os: &'a dyn Kernel,
9
+ proc: &'a mut Process,
10
+ args: &'a [String],
11
+ ) -> Pin<Box<dyn Future<Output = CommandResult> + 'a>> {
12
+ run_test(os, proc, args, "test")
13
+ }
14
+
15
+ /// `[` is `test` with a required closing `]`. Under the name `test`, `]` is
16
+ /// an ordinary word.
17
+ pub fn builtin_bracket<'a>(
18
+ os: &'a dyn Kernel,
19
+ proc: &'a mut Process,
20
+ args: &'a [String],
21
+ ) -> Pin<Box<dyn Future<Output = CommandResult> + 'a>> {
22
+ run_test(os, proc, args, "[")
23
+ }
24
+
25
+ fn run_test<'a>(
26
+ os: &'a dyn Kernel,
27
+ proc: &'a mut Process,
28
+ args: &'a [String],
29
+ name: &'static str,
30
+ ) -> Pin<Box<dyn Future<Output = CommandResult> + 'a>> {
31
+ Box::pin(async move {
32
+ let args = match args.split_last() {
33
+ _ if name == "test" => args,
34
+ Some((last, rest)) if last == "]" => rest,
35
+ _ => {
36
+ proc.err_msg("strands-shell: [: missing `]'");
37
+ return Ok(2);
38
+ }
39
+ };
40
+ match eval(args, os, proc).await {
41
+ Ok(result) => Ok(if result == Some(true) { 0 } else { 1 }),
42
+ Err(message) => {
43
+ proc.err_msg(&format!("strands-shell: {name}: {message}"));
44
+ Ok(2)
45
+ }
46
+ }
47
+ })
48
+ }
49
+
50
+ /// A test's truth value, or the usage error that makes it exit 2.
51
+ type Eval = Result<bool, String>;
52
+
53
+ /// Evaluate by POSIX's argument-count rules, so `( -n -eq )` reads `-eq` as
54
+ /// the operand of `-n` and `( -eq )` as a comparison, as bash does. With
55
+ /// three arguments a binary operator in the middle wins, even when the left
56
+ /// operand is `!` or `(`. Longer expressions go to the parser. `None` is an
57
+ /// expression that isn't well formed but stays a quiet false, so `!` can't
58
+ /// turn it true.
59
+ fn eval<'a>(
60
+ args: &'a [String],
61
+ os: &'a dyn Kernel,
62
+ proc: &'a Process,
63
+ ) -> Pin<Box<dyn Future<Output = Result<Option<bool>, String>> + 'a>> {
64
+ Box::pin(async move {
65
+ // Also checked after `!` or `(` peel words off, as in `! ! ( !`.
66
+ if let Some(operand) = missing_unary_operator(args) {
67
+ return Err(format!("{operand}: unary operator expected"));
68
+ }
69
+ let result = match args {
70
+ [] => Ok(false),
71
+ [arg] => Ok(!arg.is_empty()),
72
+ [bang, arg] if bang == "!" => Ok(arg.is_empty()),
73
+ [op, arg] if is_unary_op(op) => Ok(eval_unary(op, arg, os, proc).await),
74
+ [left, op, right] if is_binary_op(op) => binary(left, op, right, os, proc).await,
75
+ [left, op, right] if matches!(op.as_str(), "-a" | "-o") => {
76
+ let (left, right) = (!left.is_empty(), !right.is_empty());
77
+ Ok(if op == "-a" {
78
+ left && right
79
+ } else {
80
+ left || right
81
+ })
82
+ }
83
+ [open, arg, close] if open == "(" && close == ")" => Ok(!arg.is_empty()),
84
+ [bang, rest @ ..] if bang == "!" && matches!(rest.len(), 2 | 3) => {
85
+ return Ok(eval(rest, os, proc).await?.map(|r| !r));
86
+ }
87
+ [open, rest @ .., close] if open == "(" && close == ")" && rest.len() == 2 => {
88
+ return eval(rest, os, proc).await;
89
+ }
90
+ // Any other form of three or fewer is malformed: an error when
91
+ // the parser leaves words over, otherwise a quiet false.
92
+ _ if args.len() <= 3 => {
93
+ parse_whole(args, os, proc).await?;
94
+ return Ok(None);
95
+ }
96
+ _ => return parse_whole(args, os, proc).await,
97
+ };
98
+ result.map(Some)
99
+ })
100
+ }
101
+
102
+ /// Run the parser over all of `args`. Words left over, such as a binary
103
+ /// operator with no right operand, are an error. The parser also stops after
104
+ /// an operator it does not implement, which stays a quiet false (`None`).
105
+ async fn parse_whole(
106
+ args: &[String],
107
+ os: &dyn Kernel,
108
+ proc: &Process,
109
+ ) -> Result<Option<bool>, String> {
110
+ let mut pos = 0;
111
+ let result = parse_or(args, &mut pos, os, proc).await?;
112
+ if pos == args.len() {
113
+ Ok(Some(result))
114
+ } else if is_unsupported_unary_op(&args[pos - 1]) {
115
+ Ok(None)
116
+ } else {
117
+ Err("too many arguments".to_string())
118
+ }
119
+ }
120
+
121
+ /// A binary test; an integer operator rejects an operand that isn't one.
122
+ async fn binary(left: &str, op: &str, right: &str, os: &dyn Kernel, proc: &Process) -> Eval {
123
+ if matches!(op, "-eq" | "-ne" | "-lt" | "-le" | "-gt" | "-ge")
124
+ && let Some(bad) = [left, right].into_iter().find(|s| integer(s).is_none())
125
+ {
126
+ return Err(format!("{bad}: integer expression expected"));
127
+ }
128
+ Ok(eval_binary(left, op, right, os, proc).await)
129
+ }
130
+
131
+ /// Bash reads two arguments as a unary operator and its operand, so a first
132
+ /// word that is not one, as in `[ x = ]`, is a usage error. Returns that word.
133
+ /// Also covers the same pair after a leading `!`.
134
+ fn missing_unary_operator(args: &[String]) -> Option<&str> {
135
+ match args {
136
+ [bang, first, _] if bang == "!" && !is_binary_op(first) => {
137
+ missing_unary_operator(&args[1..])
138
+ }
139
+ [first, _] if first != "!" && !is_unary_op(first) && !is_unsupported_unary_op(first) => {
140
+ Some(first.as_str())
141
+ }
142
+ _ => None,
143
+ }
144
+ }
145
+
146
+ /// Unary operators bash knows but this shell does not implement.
147
+ fn is_unsupported_unary_op(s: &str) -> bool {
148
+ matches!(s, "-v" | "-R" | "-N" | "-o")
149
+ }
150
+
151
+ fn parse_or<'a>(
152
+ args: &'a [String],
153
+ pos: &'a mut usize,
154
+ os: &'a dyn Kernel,
155
+ proc: &'a Process,
156
+ ) -> Pin<Box<dyn Future<Output = Eval> + 'a>> {
157
+ Box::pin(async move {
158
+ let mut result = parse_and(args, pos, os, proc).await?;
159
+ while *pos < args.len() && args[*pos] == "-o" {
160
+ *pos += 1;
161
+ let rhs = parse_and(args, pos, os, proc).await?;
162
+ result = result || rhs;
163
+ }
164
+ Ok(result)
165
+ })
166
+ }
167
+
168
+ fn parse_and<'a>(
169
+ args: &'a [String],
170
+ pos: &'a mut usize,
171
+ os: &'a dyn Kernel,
172
+ proc: &'a Process,
173
+ ) -> Pin<Box<dyn Future<Output = Eval> + 'a>> {
174
+ Box::pin(async move {
175
+ let mut result = parse_not(args, pos, os, proc).await?;
176
+ while *pos < args.len() && args[*pos] == "-a" {
177
+ *pos += 1;
178
+ let rhs = parse_not(args, pos, os, proc).await?;
179
+ result = result && rhs;
180
+ }
181
+ Ok(result)
182
+ })
183
+ }
184
+
185
+ async fn parse_not<'a>(
186
+ args: &'a [String],
187
+ pos: &mut usize,
188
+ os: &'a dyn Kernel,
189
+ proc: &'a Process,
190
+ ) -> Eval {
191
+ if *pos < args.len() && args[*pos] == "!" {
192
+ *pos += 1;
193
+ Ok(!parse_primary(args, pos, os, proc).await?)
194
+ } else {
195
+ parse_primary(args, pos, os, proc).await
196
+ }
197
+ }
198
+
199
+ async fn parse_primary<'a>(
200
+ args: &'a [String],
201
+ pos: &mut usize,
202
+ os: &'a dyn Kernel,
203
+ proc: &'a Process,
204
+ ) -> Eval {
205
+ if *pos >= args.len() {
206
+ return Ok(false);
207
+ }
208
+
209
+ if args[*pos] == "(" {
210
+ *pos += 1;
211
+ let result = parse_or(args, pos, os, proc).await?;
212
+ if *pos < args.len() && args[*pos] == ")" {
213
+ *pos += 1;
214
+ }
215
+ return Ok(result);
216
+ }
217
+
218
+ if *pos + 2 < args.len()
219
+ && let Some(next) = args.get(*pos + 1)
220
+ && is_binary_op(next)
221
+ {
222
+ let left = &args[*pos];
223
+ let op = &args[*pos + 1];
224
+ let right = &args[*pos + 2];
225
+ *pos += 3;
226
+ return binary(left, op, right, os, proc).await;
227
+ }
228
+
229
+ if *pos + 1 < args.len() && is_unary_op(&args[*pos]) {
230
+ let op = &args[*pos];
231
+ let arg = &args[*pos + 1];
232
+ *pos += 2;
233
+ return Ok(eval_unary(op, arg, os, proc).await);
234
+ }
235
+
236
+ let s = &args[*pos];
237
+ *pos += 1;
238
+ Ok(!s.is_empty())
239
+ }
240
+
241
+ pub(crate) fn is_unary_op(s: &str) -> bool {
242
+ matches!(
243
+ s,
244
+ "-n" | "-z"
245
+ | "-e"
246
+ | "-f"
247
+ | "-d"
248
+ | "-r"
249
+ | "-w"
250
+ | "-x"
251
+ | "-s"
252
+ | "-L"
253
+ | "-h"
254
+ | "-a"
255
+ | "-b"
256
+ | "-c"
257
+ | "-p"
258
+ | "-u"
259
+ | "-g"
260
+ | "-k"
261
+ | "-t"
262
+ | "-O"
263
+ | "-G"
264
+ | "-S"
265
+ )
266
+ }
267
+
268
+ pub(crate) fn is_binary_op(s: &str) -> bool {
269
+ matches!(
270
+ s,
271
+ "=" | "=="
272
+ | "!="
273
+ | "-eq"
274
+ | "-ne"
275
+ | "-lt"
276
+ | "-le"
277
+ | "-gt"
278
+ | "-ge"
279
+ | "<"
280
+ | ">"
281
+ | "-nt"
282
+ | "-ot"
283
+ | "-ef"
284
+ )
285
+ }
286
+
287
+ pub(crate) async fn eval_unary(op: &str, arg: &str, os: &dyn Kernel, proc: &Process) -> bool {
288
+ // An empty path names no file.
289
+ if arg.is_empty() && !matches!(op, "-n" | "-z" | "-t") {
290
+ return false;
291
+ }
292
+ match op {
293
+ "-n" => !arg.is_empty(),
294
+ "-z" => arg.is_empty(),
295
+ "-e" | "-a" => os.stat(proc, arg).await.exists,
296
+ "-f" => os.stat(proc, arg).await.is_file,
297
+ "-d" => os.stat(proc, arg).await.is_dir,
298
+ "-s" => os.stat(proc, arg).await.len > 0,
299
+ "-L" | "-h" => os.lstat(proc, arg).await.is_symlink,
300
+ "-S" => os.stat(proc, arg).await.is_socket,
301
+ "-p" => os.stat(proc, arg).await.is_fifo,
302
+ "-b" => os.stat(proc, arg).await.is_block_device,
303
+ "-c" => os.stat(proc, arg).await.is_char_device,
304
+ "-r" => os.access(proc, arg, ACCESS_R).await,
305
+ "-w" => os.access(proc, arg, ACCESS_W).await,
306
+ "-x" => os.access(proc, arg, ACCESS_X).await,
307
+ "-u" => os.stat(proc, arg).await.mode & 0o4000 != 0,
308
+ "-g" => os.stat(proc, arg).await.mode & 0o2000 != 0,
309
+ "-k" => os.stat(proc, arg).await.mode & 0o1000 != 0,
310
+ "-t" => {
311
+ let fd: i32 = arg.parse().unwrap_or(-1);
312
+ os.isatty(fd)
313
+ }
314
+ "-O" => os.access(proc, arg, ACCESS_R).await,
315
+ "-G" => os.access(proc, arg, ACCESS_R).await,
316
+ _ => false,
317
+ }
318
+ }
319
+
320
+ pub(crate) async fn eval_binary(
321
+ left: &str,
322
+ op: &str,
323
+ right: &str,
324
+ os: &dyn Kernel,
325
+ proc: &Process,
326
+ ) -> bool {
327
+ if matches!(op, "-nt" | "-ot" | "-ef") && (left.is_empty() || right.is_empty()) {
328
+ return op == "-nt" && !left.is_empty() && os.stat(proc, left).await.exists
329
+ || op == "-ot" && !right.is_empty() && os.stat(proc, right).await.exists;
330
+ }
331
+ match op {
332
+ "=" | "==" => left == right,
333
+ "!=" => left != right,
334
+ "<" => left < right,
335
+ ">" => left > right,
336
+ "-eq" => num(left) == num(right),
337
+ "-ne" => num(left) != num(right),
338
+ "-lt" => num(left) < num(right),
339
+ "-le" => num(left) <= num(right),
340
+ "-gt" => num(left) > num(right),
341
+ "-ge" => num(left) >= num(right),
342
+ "-nt" => {
343
+ let a = os.stat(proc, left).await.modified;
344
+ let b = os.stat(proc, right).await.modified;
345
+ matches!((a, b), (Some(a), Some(b)) if a > b)
346
+ }
347
+ "-ot" => {
348
+ let a = os.stat(proc, left).await.modified;
349
+ let b = os.stat(proc, right).await.modified;
350
+ matches!((a, b), (Some(a), Some(b)) if a < b)
351
+ }
352
+ "-ef" => {
353
+ let a = os.stat(proc, left).await;
354
+ let b = os.stat(proc, right).await;
355
+ a.exists && b.exists && a.dev == b.dev && a.ino == b.ino
356
+ }
357
+ _ => false,
358
+ }
359
+ }
360
+
361
+ fn num(s: &str) -> i64 {
362
+ integer(s).unwrap_or(0)
363
+ }
364
+
365
+ /// Read an integer operand as bash does: decimal with an optional sign, any
366
+ /// whitespace before it and blanks after it.
367
+ fn integer(s: &str) -> Option<i64> {
368
+ s.trim_start_matches([' ', '\t', '\n', '\x0b', '\x0c', '\r'])
369
+ .trim_end_matches([' ', '\t'])
370
+ .parse()
371
+ .ok()
372
+ }