~gjabell/bmk

1827a3fd8bada24c297282d84c545623c044a792 — Galen Abell 1 year, 4 months ago da1ef52
Wrap long command descriptions at 80 chars
4 files changed, 9 insertions(+), 8 deletions(-)

M cmd/add.go
M cmd/list.go
M cmd/open.go
M cmd/remove.go
M cmd/add.go => cmd/add.go +3 -2
@@ 31,8 31,9 @@ var addCmd = &cobra.Command{
	Use:     "add",
	Aliases: []string{"a"},
	Short:   "Add a new bookmark",
	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.`,
	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.`,
	Args: func(cmd *cobra.Command, args []string) error {
		if len(args) < 1 {
			return errors.New("bookmark must have a url")

M cmd/list.go => cmd/list.go +2 -2
@@ 28,8 28,8 @@ var listCmd = &cobra.Command{
	Use:     "list",
	Aliases: []string{"l", "ls"},
	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.`,
	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.`,
	Run: func(cmd *cobra.Command, args []string) {
		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 -2
@@ 32,8 32,8 @@ var openCmd = &cobra.Command{
	Use:   "open",
	Short: "Open bookmarks in a web browser",
	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.`,
bookmarks in using xdg-open, unless the "browser" option is set in the config
file.`,
	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 -2
@@ 32,8 32,8 @@ var removeCmd = &cobra.Command{
	Use:     "remove",
	Aliases: []string{"r", "rm"},
	Short:   "Remove a bookmark",
	Long: `Remove a bookmark from the manager. Takes a list of numbers referencing the index values from
the list command.`,
	Long: `Remove a bookmark from the manager. Takes a list of numbers referencing the
index values from the list command.`,
	Args: cobra.MinimumNArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		var indices []int