Skip to main content

display_tool_name_short

Function display_tool_name_short 

Source
pub fn display_tool_name_short(snake: &str) -> String
Expand description

CC-style short tool name. Strips the redundant _file / _directory / _files suffixes (the noun is implicit from the arg) before PascalCase conversion. Generic — no per-tool match arms; works for any future tool that follows the <verb>_<noun> convention.

Examples:

  • read_fileRead
  • write_fileWrite
  • list_directoryList
  • parallel_edit_filesParallelEdit
  • bashBash (no suffix to strip)
  • search_replaceSearchReplace (suffix _replace not in strip list, kept verbatim → preserves disambiguation)