Skip to content

Commit

Permalink
Add source command
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatGodApollo committed Mar 22, 2020
1 parent 7c11d85 commit fae5f74
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var rootCmd = &cobra.Command{
Short: "A quick and easy way to run gists",
Long: `Quick Script Runner is a command line utility that allows you to run gists
with a single command.`,
Version: "0.5.0",
Version: "0.6.0",
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
39 changes: 39 additions & 0 deletions cmd/source.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cmd

import (
"fmt"
"github.com/ttacon/chalk"

"github.com/spf13/cobra"
)

// sourceCmd represents the source command
var sourceCmd = &cobra.Command{
Use: "source",
Short: "Get a link to the source code",
Long: `Just a quick and easy way to get a link
to the source code of QSR.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(chalk.Cyan.Color("[QSR]"), chalk.Blue.Color("Go check out the source @"),
chalk.Blue.Color(chalk.Underline.TextStyle("https://github.com/GreatGodApollo/qsr")))
},
}

func init() {
rootCmd.AddCommand(sourceCmd)
}

0 comments on commit fae5f74

Please sign in to comment.