+ # generic commands
+ help) _stg_help ;;
+ # repository commands
+ id) _stg_patches $command _all_patches ;;
+ # stack commands
+ float) _stg_patches $command _all_patches ;;
+ goto) _stg_patches $command _all_other_patches ;;
+ hide) _stg_patches $command _all_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 ;;
+ # patch commands
+ delete) _stg_patches $command _all_patches ;;
+ export) _stg_patches $command _applied_patches ;;
+ files) _stg_patches $command _all_patches ;;
+ log) _stg_patches $command _all_patches ;;
+ mail) _stg_patches $command _all_patches ;;
+ pick) _stg_patches $command _unapplied_patches ;;
+ refresh)_stg_patches_options $command _applied_patches "-p --patch" ;;
+ rename) _stg_patches $command _all_patches ;;
+ show) _stg_patches $command _all_patches ;;
+ sync) _stg_patches $command _applied_patches ;;
+ # working-copy commands
+ diff) _stg_patches_options $command _applied_patches "-r --range" ;;
+ # commands that usually raher accept branches
+ branch) _complete_branch $command _all_branches ;;
+ rebase) _complete_branch $command _all_branches ;;
+ # all the other commands
+ *) _stg_common $command ;;