~gjabell/bmk

268f6027a165c902668b93a40560ee0c0e358fb1 — Galen Abell 1 year, 4 months ago 056db3f
Add usage silence and disable doc tag
M cmd/add.go => cmd/add.go +2 -0
@@ 33,6 33,8 @@ var addCmd = &cobra.Command{
	Long: `Add a new bookmark to the manager, optionally specifying tags and/or a
description. These fields can be used with the list command to filter existing
bookmarks.`,
	SilenceUsage:      true,
	DisableAutoGenTag: true,
	Args: func(cmd *cobra.Command, args []string) error {
		if len(args) < 1 {
			return errors.New("bookmark must have a url")

M cmd/doc.go => cmd/doc.go +5 -3
@@ 21,9 21,11 @@ import (
)

var docCmd = &cobra.Command{
	Use:    "doc",
	Short:  "Generate man pages",
	Hidden: true,
	Use:               "doc",
	Short:             "Generate man pages",
	Hidden:            true,
	SilenceUsage:      true,
	DisableAutoGenTag: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		header := &doc.GenManHeader{
			Title:   "BMK",

M cmd/list.go => cmd/list.go +2 -0
@@ 29,6 29,8 @@ var listCmd = &cobra.Command{
	Short:   "List bookmarks",
	Long: `List bookmarks in the manager, optionally specifying a list of tags or a
description. Bookmarks will be filtered by the tags and/or description.`,
	SilenceUsage:      true,
	DisableAutoGenTag: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		filter := bookmark.Filter{Tags: tags, Indices: []int{}, Desc: strings.Join(args[0:], " ")}
		bookmarks, err := bookmark.List(config.BookmarkPath, filter)

M cmd/open.go => cmd/open.go +2 -0
@@ 31,6 31,8 @@ var openCmd = &cobra.Command{
	Long: `Open bookmarks in a web browser. By default, this command will open
bookmarks in using xdg-open, unless the "browser" option is set in the config
file.`,
	SilenceUsage:      true,
	DisableAutoGenTag: true,
	Args: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 && len(tags) == 0 {
			return errors.New("you must either specify an index or a tag")

M cmd/remove.go => cmd/remove.go +2 -0
@@ 32,6 32,8 @@ var removeCmd = &cobra.Command{
	Short:   "Remove a bookmark",
	Long: `Remove a bookmark from the manager. Takes a list of numbers referencing the
index values from the list command.`,
	SilenceUsage:      true,
	DisableAutoGenTag: true,
	Args: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			return errors.New("you must specify at least one index")

M cmd/root.go => cmd/root.go +2 -1
@@ 47,7 47,8 @@ var rootCmd = &cobra.Command{
	Long: `bmk is a command-line bookmark manager, designed to store and retrieve bookmarks
without relying on a web-browser.
`,
	TraverseChildren: true,
	SilenceUsage:      true,
	DisableAutoGenTag: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		return listCmd.RunE(cmd, args)
	},

M doc/bmk-add.1 => doc/bmk-add.1 +13 -10
@@ 9,7 9,7 @@ bmk\-add \- Add a new bookmark

.SH SYNOPSIS
.PP
\fBbmk add [flags]\fP
\fBbmk add URL [desc] [flags]\fP


.SH DESCRIPTION


@@ 24,10 24,6 @@ bookmarks.
\fB\-h\fP, \fB\-\-help\fP[=false]
	help for add

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	tag the bookmark


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP


@@ 35,6 31,18 @@ bookmarks.
	config file (default is $HOME/.config/bmk/config.yml)

.PP
\fB\-n\fP, \fB\-\-no\-confirm\fP[=false]
	don't ask to confirm operations

.PP
\fB\-p\fP, \fB\-\-plain\fP[=false]
	print a list of URLs instead of a table

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	bookmark tags

.PP
\fB\-v\fP, \fB\-\-verbose\fP[=false]
	print verbose messages



@@ 42,8 50,3 @@ bookmarks.
.SH SEE ALSO
.PP
\fBbmk(1)\fP


.SH HISTORY
.PP
2\-Jun\-2019 Auto generated by spf13/cobra

M doc/bmk-list.1 => doc/bmk-list.1 +13 -10
@@ 9,7 9,7 @@ bmk\-list \- List bookmarks

.SH SYNOPSIS
.PP
\fBbmk list [flags]\fP
\fBbmk list [desc] [flags]\fP


.SH DESCRIPTION


@@ 23,10 23,6 @@ description. Bookmarks will be filtered by the tags and/or description.
\fB\-h\fP, \fB\-\-help\fP[=false]
	help for list

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	list bookmarks matching the tag


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP


@@ 34,6 30,18 @@ description. Bookmarks will be filtered by the tags and/or description.
	config file (default is $HOME/.config/bmk/config.yml)

.PP
\fB\-n\fP, \fB\-\-no\-confirm\fP[=false]
	don't ask to confirm operations

.PP
\fB\-p\fP, \fB\-\-plain\fP[=false]
	print a list of URLs instead of a table

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	bookmark tags

.PP
\fB\-v\fP, \fB\-\-verbose\fP[=false]
	print verbose messages



@@ 41,8 49,3 @@ description. Bookmarks will be filtered by the tags and/or description.
.SH SEE ALSO
.PP
\fBbmk(1)\fP


.SH HISTORY
.PP
2\-Jun\-2019 Auto generated by spf13/cobra

M doc/bmk-open.1 => doc/bmk-open.1 +13 -10
@@ 9,7 9,7 @@ bmk\-open \- Open bookmarks in a web browser

.SH SYNOPSIS
.PP
\fBbmk open [flags]\fP
\fBbmk open [index ...] [flags]\fP


.SH DESCRIPTION


@@ 24,10 24,6 @@ file.
\fB\-h\fP, \fB\-\-help\fP[=false]
	help for open

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	open bookmarks matching the tag


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP


@@ 35,6 31,18 @@ file.
	config file (default is $HOME/.config/bmk/config.yml)

.PP
\fB\-n\fP, \fB\-\-no\-confirm\fP[=false]
	don't ask to confirm operations

.PP
\fB\-p\fP, \fB\-\-plain\fP[=false]
	print a list of URLs instead of a table

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	bookmark tags

.PP
\fB\-v\fP, \fB\-\-verbose\fP[=false]
	print verbose messages



@@ 42,8 50,3 @@ file.
.SH SEE ALSO
.PP
\fBbmk(1)\fP


.SH HISTORY
.PP
2\-Jun\-2019 Auto generated by spf13/cobra

M doc/bmk-remove.1 => doc/bmk-remove.1 +13 -10
@@ 9,7 9,7 @@ bmk\-remove \- Remove a bookmark

.SH SYNOPSIS
.PP
\fBbmk remove [flags]\fP
\fBbmk remove [index ...] [flags]\fP


.SH DESCRIPTION


@@ 23,10 23,6 @@ index values from the list command.
\fB\-h\fP, \fB\-\-help\fP[=false]
	help for remove

.PP
\fB\-n\fP, \fB\-\-no\-confirm\fP[=false]
	don't ask to confirm deletion


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP


@@ 34,6 30,18 @@ index values from the list command.
	config file (default is $HOME/.config/bmk/config.yml)

.PP
\fB\-n\fP, \fB\-\-no\-confirm\fP[=false]
	don't ask to confirm operations

.PP
\fB\-p\fP, \fB\-\-plain\fP[=false]
	print a list of URLs instead of a table

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	bookmark tags

.PP
\fB\-v\fP, \fB\-\-verbose\fP[=false]
	print verbose messages



@@ 41,8 49,3 @@ index values from the list command.
.SH SEE ALSO
.PP
\fBbmk(1)\fP


.SH HISTORY
.PP
2\-Jun\-2019 Auto generated by spf13/cobra

M doc/bmk.1 => doc/bmk.1 +12 -5
@@ 28,6 28,18 @@ without relying on a web\-browser.
	help for bmk

.PP
\fB\-n\fP, \fB\-\-no\-confirm\fP[=false]
	don't ask to confirm operations

.PP
\fB\-p\fP, \fB\-\-plain\fP[=false]
	print a list of URLs instead of a table

.PP
\fB\-t\fP, \fB\-\-tag\fP=[]
	bookmark tags

.PP
\fB\-v\fP, \fB\-\-verbose\fP[=false]
	print verbose messages



@@ 35,8 47,3 @@ without relying on a web\-browser.
.SH SEE ALSO
.PP
\fBbmk\-add(1)\fP, \fBbmk\-list(1)\fP, \fBbmk\-open(1)\fP, \fBbmk\-remove(1)\fP


.SH HISTORY
.PP
2\-Jun\-2019 Auto generated by spf13/cobra