shellquote

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package shellquote 为远程经 shell 执行的命令做 POSIX 风格转义。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinRemoteCommand

func JoinRemoteCommand(args []string) string

JoinRemoteCommand 拼接远程命令。

单参数原样返回,保留 "cd /tmp && pwd" 这类需经 shell 解释的写法; 多参数逐项 Quote 后空格连接,避免 bash -lc 等场景被拆坏。

func Quote

func Quote(s string) string

Quote 将单个参数转为可安全嵌入远程 shell 命令行的形式。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL