Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
update command docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mike182uk committed Mar 31, 2020
1 parent ab6ca2e commit e40c399
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions cmd/snpt/command/copy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (
// New returns a new copy command
func New(out io.Writer, in io.Reader, hasInput bool, snptStore *snippet.Store) *cobra.Command {
return &cobra.Command{
Use: "copy [snippet ID]",
Use: "copy [snippet ID | snippet name]",
Aliases: []string{"cp"},
Short: "Copy a snippet to the clipboard",
Long: `
Copy a snippet to the clipboard.
If you do not provide a snippet ID then a prompt will be shown and you can select the snippet you want to copy to the clipboard.
If you do not provide a snippet ID or snippet name then a prompt will be shown and you can select the snippet you want to copy to the clipboard.
Snpt will read from stdin if provided and attempt to extract a snippet ID from it. The stdin should be formatted like:
Some random string [snippet ID]
Snpt will parse anything in the square brackets that appears at the end of the string. This is useful for piping into snpt:
Snpt will parse anything in the square brackets that appears at the end of the string. This is useful for piping into Snpt:
echo 'foo - bar baz [aff9aa71ead70963p3bfa4e49b18d27539f9d9d8]' | snpt cp`,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 3 additions & 3 deletions cmd/snpt/command/print/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ import (
// New returns a new print command
func New(out io.Writer, in io.Reader, hasInput bool, snptStore *snippet.Store) *cobra.Command {
return &cobra.Command{
Use: "print [snippet ID]",
Use: "print [snippet ID | snippet name]",
Short: "Print a snippet to the screen",
Long: `
Print a snippet to the screen.
If you do not provide a snippet ID then a prompt will be shown and you can select the snippet you want to print to the screen.
If you do not provide a snippet ID or snippet name then a prompt will be shown and you can select the snippet you want to print to the screen.
Snpt will read from stdin if provided and attempt to extract a snippet ID from it. The stdin should be formatted like:
Some random string [snippet ID]
Snpt will parse anything in the square brackets that appears at the end of the string. This is useful for piping into snpt:
Snpt will parse anything in the square brackets that appears at the end of the string. This is useful for piping into Snpt:
echo 'foo - bar baz [aff9aa71ead70963p3bfa4e49b18d27539f9d9d8]' | snpt print`,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/snpt/command/token/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func New(out io.Writer, c *config.Config) *cobra.Command {
Long: `
Set your GitHub access token.
You will be prompted to supply your GitHub access token. This will be saved in snpt's database for use when retrieving your Gists from GitHub.`,
You will be prompted to supply your GitHub access token. This will be saved in Snpt's database for use when retrieving your Gists from GitHub.`,
RunE: func(cmd *cobra.Command, args []string) error {
token := prompt.PasswordMasked("Enter your GitHub access token")

Expand Down
6 changes: 3 additions & 3 deletions cmd/snpt/command/write/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ import (
// New returns a new write command
func New(out io.Writer, in io.Reader, hasInput bool, snptStore *snippet.Store) *cobra.Command {
return &cobra.Command{
Use: "write [snippet ID]",
Use: "write [snippet ID | snippet name]",
Short: "Write a snippet to disk",
Long: `
Write a snippet to disk.
If you do not provide a snippet ID then a prompt will be shown and you can select the snippet you want to write to disk.
If you do not provide a snippet ID or snippet name then a prompt will be shown and you can select the snippet you want to write to disk.
Snpt will read from stdin if provided and attempt to extract a snippet ID from it. The stdin should be formatted like:
Some random string [snippet ID]
Snpt will parse anything in the square brackets that appears at the end of the string. This is useful for piping into snpt:
Snpt will parse anything in the square brackets that appears at the end of the string. This is useful for piping into Snpt:
echo 'foo - bar baz [aff9aa71ead70963p3bfa4e49b18d27539f9d9d8]' | snpt write`,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down

0 comments on commit e40c399

Please sign in to comment.