Skip to content

Commit

Permalink
Adding manpath support in command-line.
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviof committed Sep 27, 2019
1 parent 9d5f066 commit 03b3cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/path-helper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Command-Line Options:
flag.PrintDefaults()
}

flag.StringVar(&config.BaseDir, "b", "/etc/paths.d", "Base directory")
flag.StringVar(&config.PathBaseDir, "p", "/etc/paths.d", "Paths directory")
flag.StringVar(&config.ManBaseDir, "m", "/etc/manpaths.d", "Man pages directory")
flag.BoolVar(&config.SkipNotFound, "d", true, "Skip not found directories")
flag.BoolVar(&config.SkipDuplicates, "s", true, "Skip duplicated entries")
flag.BoolVar(&config.Verbose, "v", false, "Verbose")
Expand Down
3 changes: 2 additions & 1 deletion pkg/path-helper/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package pathhelper

// Config all configuration entries supported by this application.
type Config struct {
BaseDir string // base directory
PathBaseDir string // paths.d directory path
ManBaseDir string // manpaths.d directory path
SkipNotFound bool // make sure all directories in path exist
SkipDuplicates bool // skip duplicated entries to compose PATH
Verbose bool // make output verbose
Expand Down

0 comments on commit 03b3cce

Please sign in to comment.