diff options
| author | Vineet Kumar <git@vineetk.net> | 2026-05-26 00:44:46 -0400 |
|---|---|---|
| committer | Vineet Kumar <git@vineetk.net> | 2026-05-26 01:46:47 -0400 |
| commit | b289ee4ddbcd791f23537e9a7ad1cc2c1f839eda (patch) | |
| tree | cd13447d92c80b2acef1fab5872e8a4e99b66934 | |
| parent | 0584ace0f5368111f9898256b7fead019493a6e4 (diff) | |
update bash tool to explicitly mention the other tools
the llm otherwise could rationalize to use bash otherwise since it was
initially vague
| -rw-r--r-- | llm-tools.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llm-tools.el b/llm-tools.el index 79aff59..c0f859e 100644 --- a/llm-tools.el +++ b/llm-tools.el | |||
| @@ -271,7 +271,7 @@ COMMAND is the bash command string to execute." | |||
| 271 | "\\bmkfs\\b" | 271 | "\\bmkfs\\b" |
| 272 | "\\bsudo\\b" | 272 | "\\bsudo\\b" |
| 273 | "\\bdoas\\b" | 273 | "\\bdoas\\b" |
| 274 | "[^>]>[^>]" ; any singular > that isn't >> | 274 | "[^>]>[^>&0-9]" ; any singular > that isn't >> nor file-descriptor redirect |
| 275 | "\\$(" | 275 | "\\$(" |
| 276 | "`" | 276 | "`" |
| 277 | "|[ \t]*\\bsh\\b" | 277 | "|[ \t]*\\bsh\\b" |
| @@ -292,6 +292,13 @@ tests or other development or system administration tasks. | |||
| 292 | Use the dedicated tools for file operations, searching, and code | 292 | Use the dedicated tools for file operations, searching, and code |
| 293 | navigation instead of shell commands. | 293 | navigation instead of shell commands. |
| 294 | 294 | ||
| 295 | - For file contents: use `read_file` or `web_fetch` | ||
| 296 | - For file discovery/metadata: use `find_files` | ||
| 297 | - For searching text in files: use `grep` | ||
| 298 | - For editing files: use `edit_file` or `write_file` | ||
| 299 | |||
| 300 | Bash should be a last resort, used only when no other tool fits the task. | ||
| 301 | |||
| 295 | - Quote file paths with spaces using double quotes. | 302 | - Quote file paths with spaces using double quotes. |
| 296 | - Chain dependent commands with && (or ; if failures are OK) | 303 | - Chain dependent commands with && (or ; if failures are OK) |
| 297 | - Use absolute paths instead of cd when possible | 304 | - Use absolute paths instead of cd when possible |
| @@ -302,8 +309,8 @@ EXAMPLES: | |||
| 302 | - Check file type: 'file document.pdf' | 309 | - Check file type: 'file document.pdf' |
| 303 | - Count lines: 'wc -l *.txt' | 310 | - Count lines: 'wc -l *.txt' |
| 304 | 311 | ||
| 305 | The command will be executed in the current working directory. Output is | 312 | The command will be executed in the current working directory. Output is |
| 306 | returned as a string. Long outputs should be filtered/limited using pipes." | 313 | returned as a string. Long outputs should be filtered/limited using pipes." |
| 307 | :args '((:name "command" | 314 | :args '((:name "command" |
| 308 | :type string | 315 | :type string |
| 309 | :description "The Bash command to execute.\ | 316 | :description "The Bash command to execute.\ |
