Documentation
¶
Index ¶
- Constants
- func ColorizeTags(tags []string) string
- func CopyToClipboard(container *tuikit.Container, text, successMsg string)
- func NormalizeFormat(format string) string
- func OpenInEditor(path string, stdIn, stdOut *os.File) error
- func ShortenPath(p string) string
- func TagColor(tag string) color.Color
Constants ¶
View Source
const ( YAMLFormat = "yaml" JSONFormat = "json" )
View Source
const HeaderContextKey = "ctx"
Variables ¶
This section is empty.
Functions ¶
func ColorizeTags ¶
ColorizeTags sorts tags and renders each as a colored pill badge.
func CopyToClipboard ¶
CopyToClipboard writes text to the system clipboard in a goroutine to avoid blocking the bubbletea event loop (pbcopy/xclip can hang under raw terminal mode). Shows a toast notice on success or failure.
func NormalizeFormat ¶
func ShortenPath ¶
ShortenPath returns a display-friendly version of p: the home directory prefix is replaced with ~/, and if the result still has more than maxPathSegments slash-separated components the last four are kept preceded by …/.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.