diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-19 21:50:03 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-19 21:51:16 +0200 |
commit | d71411f9179d2930e791c4f9d3a7accef9b80eb2 (patch) | |
tree | 9d84e325875f25768f3e60b50f8060d8312cc5ce /commands/ls.go | |
parent | d57e2fdd1977b9a5d4984d7146e66349001893b3 (diff) | |
download | git-bug-d71411f9179d2930e791c4f9d3a7accef9b80eb2.tar.gz |
commands: ls now accept queries without quote
Diffstat (limited to 'commands/ls.go')
-rw-r--r-- | commands/ls.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/ls.go b/commands/ls.go index 7bab429d..ad45eefa 100644 --- a/commands/ls.go +++ b/commands/ls.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "strings" "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" @@ -27,7 +28,7 @@ func runLsBug(cmd *cobra.Command, args []string) error { var query *cache.Query if len(args) >= 1 { - query, err = cache.ParseQuery(args[0]) + query, err = cache.ParseQuery(strings.Join(args, " ")) if err != nil { return err @@ -133,7 +134,7 @@ var lsCmd = &cobra.Command{ You can pass an additional query to filter and order the list. This query can be expressed either with a simple query language or with flags.`, Example: `List open bugs sorted by last edition with a query: -git bug ls "status:open sort:edit-desc" +git bug ls status:open sort:edit-desc List closed bugs sorted by creation with flags: git bug ls --status closed --by creation |