Cli.Zsh.esc: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 6161-6170 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=6161&end_line=6170 import Base # Text in an _arguments spec or a _describe entry, with \, [, ] and : # backslash-escaped (P5). def Zsh.esc(s: String) -> String: match s: case SNil{}: SNil{} case SCon{Chr{92}, tail}: String.append("\\\\", Zsh.esc(tail)) case SCon{Chr{91}, tail}: String.append("\\[", Zsh.esc(tail)) case SCon{Chr{93}, tail}: String.append("\\]", Zsh.esc(tail)) case SCon{Chr{58}, tail}: String.append("\\:", Zsh.esc(tail)) case SCon{c, tail}: SCon{c, Zsh.esc(tail)} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil