Use stg branch in bash and fish completions
commitbe7ae8d20607ccd98afbe5dc353b2be2a40c3726
authorPeter Grayson <pete@jpgrayson.net>
Sat, 7 Mar 2020 21:12:17 +0000 (7 16:12 -0500)
committerPeter Grayson <pete@jpgrayson.net>
Mon, 9 Mar 2020 01:14:50 +0000 (8 21:14 -0400)
tree0e5aac9d05e2161b9dd277fbed0ca94be621987a
parentc32a2356b2e4f1effac30f221bf525d465dc3df9
Use stg branch in bash and fish completions

Instead of the bash completion script inspecting .git/refs/patches to find
patches, it now runs `stg series`. The .git/refs/patches directory is an
implementation detail and will likely change soon, so using the stg
porcelain keeps the script at the right level of abstraction.

Similarly, both the bash and fish completions are also updated to use `stg
branch` to generate the list of StGit branches instead of searching
.git/refs/heads for `.stgit` log branches. The log branches may be renamed
in the future.

Finally, a few additional changes are made to the bash completions to
cleanup some shellcheck warnings.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
stgit/completion/bash.py
stgit/completion/fish.py