commands

package
v0.0.0-...-5ec133c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SearchCmd = &cobra.Command{
	Use:     "search [QUERY]",
	Short:   "Searches YouTube",
	Long:    "Searches YouTube for channels, videos, and playlists.",
	Aliases: []string{"s"},
	Args:    cobra.MinimumNArgs(0),
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) == 0 {
			views.SearchWithPrompt()
		} else {
			query := strings.Join(args, " ")

			views.SearchWithQuery(types.Context{
				PrevView: "none",
				ActionInfo: map[string]string{
					"query": query,
				},
			})
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL