shellquote

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 3 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 spells a value for a command line that fft prints for a user to paste into a shell. Anything that reaches such a line from the tenant goes through it: a facility id or a tag value is text a stranger may have chosen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quote

func Quote(s string) (quoted string, portable bool)

Quote is s quoted so that a POSIX shell, fish and PowerShell all read it back as s, and leaves it bare when none of them would read it as anything else.

Single quotes are the one quoting the three share, and only while the value holds no single quote and no backslash: a POSIX shell cannot escape a quote inside them, fish reads \' and \\ there, and PowerShell doubles a quote and takes the typographic ones for quotes too. A value with any of those, or with a control or formatting character, has no portable spelling. It is returned POSIX-quoted and stripped of what a terminal would act on, for display only, and portable is false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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