configcmd

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "config",
	Short: "Display or manage config file contents.",
	Long: `Display or manage config file contents.

ptool use a single .toml or .yaml format config file to store user data (e.g. clients & sites info).
By default it tries to locate the config file in pre-defined pathes by order,
use the first found one as the config file. The dir of the config file is used as config dir.
Some ptool cmds may create & use additional files or folders inside the config dir.
To manually select the config file path, use the global "--config string" flag.

Pre-defined config file pathes list (by order):
1. ~/.config/ptool/ptool.toml
2. ~/.config/ptool/ptool.yaml
3. ./ptool.toml
4. ./ptool.yaml

The "~" is the the home dir of current user in OS:
on Linux & macOS, it's $HOME env; on Windows, it's %USERPROFILE%.
The "." is the current working dir when running ptool.

If no file in pre-defined pathes list exists and --config flag is not set,
it use the first one of the pre-defined pathes list as the config file location.`,
	Args: cobra.MatchAll(cobra.ExactArgs(0), cobra.OnlyValidArgs),
	RunE: configcmd,
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL