X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/450ae43a43b2d0d94ee1f6f0063d5e6ff284f5ad..ca8b854cbf353ed87fd9284d50f69229bf40e22d:/contrib/stgit-completion.bash diff --git a/contrib/stgit-completion.bash b/contrib/stgit-completion.bash index 7e45c7e..a843db4 100644 --- a/contrib/stgit-completion.bash +++ b/contrib/stgit-completion.bash @@ -15,7 +15,6 @@ _stg_commands=" applied assimilate branch - bury delete diff clean @@ -46,6 +45,7 @@ _stg_commands=" rm series show + sink status sync top @@ -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 () { @@ -201,14 +208,14 @@ _stg () # repository commands id) _stg_patches $command _all_patches ;; # stack commands - bury) _stg_patches $command _all_patches ;; 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 ;; - unhide) _stg_patches $command _all_patches ;; + sink) _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 ;;