ssh-mcp-rs 4.1.1

SeSSHion: lightweight SSH MCP server for LLM agents
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Shell escaping utilities shared across subsystems.
//!
//! This module is intentionally dependency-neutral to avoid introducing
//! architectural cycles between `background` and `ssh`.

/// Escapes a string for safe use inside a single-quoted shell string.
///
/// This replaces each `'` with the standard POSIX pattern `'"'"'`.
pub(crate) fn escape_for_shell(s: &str) -> String {
    s.replace('\'', "'\"'\"'")
}