-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add to simple screen printer * WIP for starting todos * filter by started date * add a flag for started * formatting fix * refactor. this is now a status command * Fix CLI auth flow * use correct hb endpoint * update version * ensure we send status to the backend Co-authored-by: Grant Ammons <[email protected]>
- Loading branch information
Showing
10 changed files
with
152 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/spf13/cobra" | ||
"github.com/ultralist/ultralist/ultralist" | ||
) | ||
|
||
func init() { | ||
var ( | ||
setStatusCmdDesc = "Sets the status of a todo item" | ||
setStatusCmdExample = ` | ||
ultralist status 33 blocked | ||
ultralist s 33 blocked` | ||
setStatusCmdLongDesc = `Sets the status of a todo item. Status can be any string.` | ||
) | ||
|
||
var setStatusCmd = &cobra.Command{ | ||
Use: "status [id] <status>", | ||
Aliases: []string{"s"}, | ||
Example: setStatusCmdExample, | ||
Long: setStatusCmdLongDesc, | ||
Short: setStatusCmdDesc, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
ultralist.NewApp().SetTodoStatus(strings.Join(args, " ")) | ||
}, | ||
} | ||
|
||
rootCmd.AddCommand(setStatusCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters