MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / shell_words

Function shell_words

src/hooks/cursor_shell.rs:211–213  ·  view source on GitHub ↗

Splits a shell command line into words, honoring single/double quotes and backslash escapes. Shared with `tool_hints` so search-command classification sees the same tokens as the checkout/sync parsing here.

(command: &str)

Source from the content-addressed store, hash-verified

209/// backslash escapes. Shared with `tool_hints` so search-command
210/// classification sees the same tokens as the checkout/sync parsing here.
211pub(crate) fn shell_words(command: &str) -> Vec<String> {
212 shell_words_for_platform(command, cfg!(windows))
213}
214
215fn shell_words_for_platform(command: &str, windows: bool) -> Vec<String> {
216 let mut words = Vec::new();

Calls 1

shell_words_for_platformFunction · 0.85

Tested by

no test coverage detected