git-bug icon indicating copy to clipboard operation
git-bug copied to clipboard

Enhance `ls-id` (or merge functionality into `ls`)

Open smoyer64 opened this issue 2 years ago • 3 comments

As noted in https://github.com/MichaelMure/git-bug/pull/842#issuecomment-1213194755, ls-id doesn't have the querying/filtering abilities of ls but does provide the ability to list only bug hash prefixes (ids). Now that https://github.com/MichaelMure/git-bug/pull/851 is merged, it's possible to use ls for this purpose (on *nix) as follows:

git bug ls  [QUERY] [flags] | cut -f1

smoyer64 avatar Aug 25 '22 11:08 smoyer64

Reflecting a bit on this, it make sense to have a ls formatter spewing only IDs, it avoids the need to do pipe handling, and it's a kinda more natural concept: "just format ls the way you want", rather than polluting the entity namespace.

Not a fan of -f quiet though, let's call it -f id.

MichaelMure avatar Aug 25 '22 12:08 MichaelMure

Seems like part of my CLI duties ;) ... I could take care of this on Monday (8/29). What should we do with ls-id? Delete it and put a deprecation note in the help that points the user to ls -f id?

smoyer64 avatar Aug 25 '22 14:08 smoyer64

Cobra has a deprecation feature on commands, we can use that to keep it around for some time.

MichaelMure avatar Sep 14 '22 09:09 MichaelMure