Skip to content

Commit 15b9a3d

Browse files
committed
feat: add config path to help command
1 parent fc00be4 commit 15b9a3d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func newRootCmd() *cobra.Command {
9595
cmd := &cobra.Command{
9696
Use: "hdf [query]",
9797
Short: "Kill processes by port, name, PID, or pattern",
98-
Long: "hdf — a smart process killer. Pass a port number, process name, PID, or glob pattern.",
98+
Long: fmt.Sprintf("hdf — a smart process killer. Pass a port number, process name, PID, or glob pattern.\n\nConfig: %s", config.Path()),
9999
Version: versionString,
100100
Args: cobra.MaximumNArgs(1),
101101
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {

internal/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ func configPath() string {
2626
return filepath.Join(configDir(), "config.toml")
2727
}
2828

29+
func Path() string {
30+
return configPath()
31+
}
32+
2933
func Load() (*Config, error) {
3034
cfg := defaultConfig
3135

0 commit comments

Comments
 (0)