Skip to content

Commit

Permalink
Improve help content
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Nov 8, 2024
1 parent 469f1cd commit 9787b6b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
42 changes: 21 additions & 21 deletions .github/images/usage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,28 +255,28 @@ func printMan() {
func genUsage() *usage.Info {
info := usage.NewInfo()

info.AddCommand(CMD_BASENAME, "Strip directory and suffix from filenames", "?path")
info.AddCommand(CMD_DIRNAME, "Strip last component from file name", "?path")
info.AddCommand(CMD_DIRNAME_NUM, "Return N elements from path", "num", "?path")
info.AddCommand(CMD_READLINK, "Print resolved symbolic links or canonical file names", "?path")
info.AddCommand(CMD_CLEAN, "Print shortest path name equivalent to path by purely lexical processing", "?path")
info.AddCommand(CMD_COMPACT, "Converts path to compact representation", "?path")
info.AddCommand(CMD_ABS, "Print absolute representation of path", "?path")
info.AddCommand(CMD_EXT, "Print file extension", "?path")
info.AddCommand(CMD_MATCH, "Filter given path using pattern", "pattern", "?path")
info.AddCommand(CMD_JOIN, "Join path elements", "root", "?path")

info.AddCommand(CMD_ADD_PREFIX, "Add the substring at the beginning", "prefix", "?path")
info.AddCommand(CMD_DEL_PREFIX, "Remove the substring at the beginning", "prefix", "?path")
info.AddCommand(CMD_ADD_SUFFIX, "Add the substring at the end", "suffix", "?path")
info.AddCommand(CMD_DEL_SUFFIX, "Remove the substring at the end", "suffix", "?path")
info.AddCommand(CMD_EXCLUDE, "Exclude part of the string", "substr", "?path")
info.AddCommand(CMD_STRIP_EXT, "Remove file extension", "?path")

info.AddCommand(CMD_IS_ABS, "Check if given path is absolute", "?path")
info.AddCommand(CMD_IS_LOCAL, "Check if given path is local", "?path")
info.AddCommand(CMD_IS_SAFE, "Check if given path is safe", "?path")
info.AddCommand(CMD_IS_MATCH, "Check if given path is match to pattern", "pattern", "?path")
info.AddCommand(CMD_BASENAME, "Strip directory and suffix from filenames", "?path")
info.AddCommand(CMD_DIRNAME, "Strip last component from file name", "?path")
info.AddCommand(CMD_DIRNAME_NUM, "Return N elements from path", "num", "?path")
info.AddCommand(CMD_READLINK, "Print resolved symbolic links or canonical file names", "?path")
info.AddCommand(CMD_CLEAN, "Print shortest path name equivalent to path by purely lexical processing", "?path")
info.AddCommand(CMD_COMPACT, "Converts path to compact representation", "?path")
info.AddCommand(CMD_ABS, "Print absolute representation of path", "?path")
info.AddCommand(CMD_EXT, "Print file extension", "?path")
info.AddCommand(CMD_MATCH, "Filter given path using pattern", "pattern", "?path")
info.AddCommand(CMD_JOIN, "Join path elements", "root", "?path")

info.AddCommand(CMD_ADD_PREFIX, "Add the substring at the beginning", "prefix", "?path")
info.AddCommand(CMD_DEL_PREFIX, "Remove the substring at the beginning", "prefix", "?path")
info.AddCommand(CMD_ADD_SUFFIX, "Add the substring at the end", "suffix", "?path")
info.AddCommand(CMD_DEL_SUFFIX, "Remove the substring at the end", "suffix", "?path")
info.AddCommand(CMD_EXCLUDE, "Exclude part of the string", "substr", "?path")
info.AddCommand(CMD_STRIP_EXT, "Remove file extension", "?path")

info.AddCommand(CMD_IS_ABS, "Check if given path is absolute", "?path")
info.AddCommand(CMD_IS_LOCAL, "Check if given path is local", "?path")
info.AddCommand(CMD_IS_SAFE, "Check if given path is safe", "?path")
info.AddCommand(CMD_IS_MATCH, "Check if given path is match to pattern", "pattern", "?path")

info.AddOption(OPT_ZERO, "End each output line with NUL, not newline")
info.AddOption(OPT_SPACE, "End each output line with space, not newline")
Expand Down

0 comments on commit 9787b6b

Please sign in to comment.