commit 992ecae8bc27d63460c90eb7640f30253ec7bd69
parent eebd83ad56c51faea6cca034ab2698704e030b5e
Author: Sean Enck <sean@ttypty.com>
Date: Sun, 3 Sep 2023 15:32:38 -0400
template this value
Diffstat:
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/internal/app/core.go b/internal/app/core.go
@@ -92,11 +92,12 @@ type (
}
// Documentation is how documentation segments are templated
Documentation struct {
- Executable string
- MoveCommand string
- RemoveCommand string
- ReKeyCommand string
- ReKey struct {
+ Executable string
+ MoveCommand string
+ RemoveCommand string
+ ReKeyCommand string
+ ShellHelpCommand string
+ ReKey struct {
Store string
KeyFile string
Key string
@@ -215,10 +216,11 @@ func Usage(verbose bool, exe string) ([]string, error) {
return nil, err
}
document := Documentation{
- Executable: filepath.Base(exe),
- MoveCommand: MoveCommand,
- RemoveCommand: RemoveCommand,
- ReKeyCommand: ReKeyCommand,
+ Executable: filepath.Base(exe),
+ MoveCommand: MoveCommand,
+ RemoveCommand: RemoveCommand,
+ ReKeyCommand: ReKeyCommand,
+ ShellHelpCommand: CompletionHelpCommand,
}
document.ReKey.Store = setDocFlag(config.ReKeyStoreFlag)
document.ReKey.Key = setDocFlag(config.ReKeyKeyFlag)
diff --git a/internal/app/doc/details b/internal/app/doc/details
@@ -49,7 +49,7 @@ Note that is an advanced feature and should be used with caution/backups/etc.
Completions are available for certain shells and, by default, assume all
features of `{{ $.Executable }}` are enabled and available. When changing certain environment
flags it may be useful to change the completion profile to more closely match
-the restricted command options, run `{{ $.Executable }} <shell> help` for information
+the restricted command options, run `{{ $.Executable }} <shell> {{ $.ShellHelpCommand }}` for information
on how best to alter completion outputs.
[environment variables]