From 75b6330243e9f81c2d560749864670a4fcde2f95 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Sat, 29 Feb 2020 14:29:32 +0100 Subject: [PATCH] Adds filter command --- cmd/add.go | 2 +- cmd/filter.go | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 cmd/filter.go diff --git a/cmd/add.go b/cmd/add.go index e7091ac..8e979e5 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -97,7 +97,7 @@ func RunGreps(dir string, strs, exts []string, caseInsensitive bool) ([]*model.T tickets = model.RemoveDuplicateTickets(tickets) fmt.Printf("%d matches found\n", len(tickets)) - + return tickets, nil } diff --git a/cmd/filter.go b/cmd/filter.go new file mode 100644 index 0000000..a84ee42 --- /dev/null +++ b/cmd/filter.go @@ -0,0 +1,12 @@ +package cmd + +func FilterCmd() *cobra.Command { + return &cobra.Command{ + Use: "filter", + Short: "Interactively filters the current ticket list", + Args: cobra.NoArgs, + Run: filterCmdF, + } +} + +func filterCmdF(_ *cobra.Command, _ []string) {}