X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/6f1c5e3ccbdcd62a0836d5c69cd86bef4589bdae..bb95cfba3b27f4fa1c82998874a9f288c379cb1c:/contrib/stgit-completion.bash diff --git a/contrib/stgit-completion.bash b/contrib/stgit-completion.bash index d497098..a843db4 100644 --- a/contrib/stgit-completion.bash +++ b/contrib/stgit-completion.bash @@ -81,6 +81,13 @@ _unapplied_patches () [ "$g" ] && cat "$g/patches/$(_current_branch)/unapplied" } +# List of all applied patches. +_hidden_patches () +{ + local g=$(_gitdir) + [ "$g" ] && cat "$g/patches/$(_current_branch)/hidden" +} + # List of all patches. _all_patches () { @@ -203,12 +210,12 @@ _stg () # stack commands float) _stg_patches $command _all_patches ;; goto) _stg_patches $command _all_other_patches ;; - hide) _stg_patches $command _all_patches ;; + hide) _stg_patches $command _unapplied_patches ;; pop) _stg_patches $command _applied_patches ;; push) _stg_patches $command _unapplied_patches ;; series) _stg_patches $command _all_patches ;; sink) _stg_patches $command _all_patches ;; - unhide) _stg_patches $command _all_patches ;; + unhide) _stg_patches $command _hidden_patches ;; # patch commands delete) _stg_patches $command _all_patches ;; export) _stg_patches $command _applied_patches ;;