Commit Graph

16 Commits

Author SHA1 Message Date
Johannes Altmanninger
bc6ba02bd8
Add command-specific argument completions
Complete bug IDs, bridges, users, labels where appropriate.

This works in bash and fish. ZSH is not yet supported by Cobra.
In fish, descriptions (the part of a completion after the "\t") are shown
as completion label, and can be searched with Ctrl+S.

Reproduce with

	fish -C 'source misc/fish_completion/git-bug'
	git bug select ^I

(tested with fish version 3.3.1)

Also works with bash, but only for "git-bug" (with the dash)

	bash --rcfile <(echo source misc/bash_completion/git-bug)
	git-bug select ^I

Closes #493
2022-05-01 10:54:13 +02:00
Michael Muré
271dc1334c
commands: proper backend close on RunE error 2021-05-09 11:33:20 +02:00
Michael Muré
ae5c0967ce commands: cleanup the command's usage to avoid warnings when generating the doc 2020-07-28 20:24:24 +02:00
Michael Muré
536c290dfb
commands: open and close the backend in a single place, simplify commands 2020-06-28 19:09:32 +02:00
Michael Muré
26bd1dd110
commands: refactor to avoid globals 2020-06-28 18:26:29 +02:00
Michael Muré
f72a9dc62b
switch to go-term-text to fix bad underflow for label rendering 2019-11-03 14:00:35 +01:00
Michael Muré
99b5c58d43 finish the refactoring for the dedicated identifier type 2019-08-12 16:12:14 +02:00
Jocelyn FACCHINI
0d4167a296
Renamed user id to user-id and metioned bug for some commands 2019-03-23 18:07:27 +00:00
Jocelyn FACCHINI
146b6b8599
Select and Label command documentation
- Informed that label command adds/removes a label to a given bug.
- Added suggestion to use select command when omitting to provide a bug id as argument.
- Added a bit more detail for the select command documentation, giving a hint to "deselect" command.
2019-03-23 16:59:40 +00:00
Michael Muré
2fd5f71b59
commands: add a "." at the end of Short commands usage 2019-03-01 22:52:52 +01:00
Rafael Passos
f72b18496b moved cleaner function to util/interrupt 2018-10-24 18:36:39 -03:00
Rafael Passos
c38f8f1c30 Registering lock clearing functions to Cleaner 2018-10-23 18:01:00 -03:00
Michael Muré
7a511f9a13
commands: don't load the repo for commands that don't need it
fix #67
2018-10-17 20:39:35 +02:00
Michael Muré
86792d7892
commands: don't forget to treat the error when selecting a bug 2018-09-26 16:49:42 +02:00
Michael Muré
544b9cc0c4
commands: convert compatible commands to the implicit select mechanism 2018-09-18 13:28:01 +02:00
Michael Muré
5f9fd2a2d9
commands: add a "select" command to select a bug for future implicit use 2018-09-18 13:17:39 +02:00