Documentation
¶
Overview ¶
Package progname resolves the name this binary was invoked as, so that user-facing text names the command the user actually has.
The same source ships under two names: `rysh` for the open-source build and `ry` for the closed one. Text is written with the literal "rysh"; Rewrite swaps in the real name at print time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Name ¶
func Name() string
Name reports the name this binary was invoked as, falling back to "rysh" when argv[0] is unusable. A "*.test" name (the binary `go test` builds) also falls back, so output does not depend on the test harness.
func Rewrite ¶
Rewrite replaces the standalone word "rysh" with the invoked binary name.
Only the bare command word is replaced. Anything touching '.', '/', '-' or '_' is a filename, path or identifier and keeps its real spelling — rysh.config.yaml, ./.rysh/, /tmp/rysh/logs/, rysh.lock, rysh-cli.
Two further spellings are left alone because they are not the binary:
[rysh] the prefix tagging output as coming from the multiplexer ##rysh the in-session system command, named the same in both builds
'[' and '#' are not name characters, so the boundary rules alone would have replaced these; taggedForm excludes them explicitly.
Types ¶
This section is empty.