diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-22 21:51:29 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-22 21:51:29 +0200 |
| commit | d88661935fa2b6e2c0fe93345800113e1a71b451 (patch) | |
| tree | 0002f1152a4eebafee6e3dea4065964a50d786c0 /flags | |
| parent | deebd135ffcb1c167f12ecf2d4c0aebdc14cbc86 (diff) | |
docs
Diffstat (limited to 'flags')
| -rw-r--r-- | flags/flags.go | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/flags/flags.go b/flags/flags.go index c500356..9fb8d44 100644 --- a/flags/flags.go +++ b/flags/flags.go @@ -3,15 +3,26 @@ package flags import "github.com/spf13/pflag" var ( - Here = pflag.BoolP("here", "h", false, "run target in current directory instead of source location") - At = pflag.StringP("at", "@", "", "override run location") - Single = pflag.BoolP("single", "s", false, "do not run any triggers") - All = pflag.BoolP("all", "a", false, "get sources from cache instead of crawling") - Dry = pflag.BoolP("dry", "d", false, "print cmdlines instead of running them") - Root = pflag.BoolP("root", "r", false, "run targets (including triggers) with sudo") - Yes = pflag.BoolP("yes", "y", false, "auto-confirm y/n confirmations") - Env = pflag.StringArray("env", nil, "environment files or pre- or suffix") + // Here makes pik run the target at the current location instead of in its source directory + Here = pflag.BoolP("here", "h", false, "run target in current directory instead of source location") + // At makes pik run in an arbitrary location + At = pflag.StringP("at", "@", "", "override run location") + // Single will make pik skip triggers + Single = pflag.BoolP("single", "s", false, "do not run any triggers") + // All will make pik load cached state instead of crawling + All = pflag.BoolP("all", "a", false, "get sources from cache instead of crawling") + // Dry will prevent pik from running targets and output the command as text instead + Dry = pflag.BoolP("dry", "d", false, "print cmdlines instead of running them") + // Root will prefix the target with sudo to run it as root + Root = pflag.BoolP("root", "r", false, "run targets (including triggers) with sudo") + // Yes will skip y/n prompts and always answer yes + Yes = pflag.BoolP("yes", "y", false, "auto-confirm y/n confirmations") + // Env can be used to load additional .env files + Env = pflag.StringArray("env", nil, "environment files or pre- or suffix") + // Version means we should print the pik version and exit Version = pflag.BoolP("version", "v", false, "print version and exit") - List = pflag.BoolP("list", "l", false, "list available targets and exit") - Inline = pflag.BoolP("inline", "i", false, "do not use terminal alt screen") + // List means we should output available targets separated by $IFS + List = pflag.BoolP("list", "l", false, "list available targets and exit") + // Inline means pik does not go to the terminal alt screen + Inline = pflag.BoolP("inline", "i", false, "do not use terminal alt screen") ) |
