- delete) _stg_all_patches $command ;;
- export) _stg_applied_patches $command ;;
- files) _stg_all_patches $command ;;
- log) _stg_all_patches $command ;;
- mail) _stg_applied_patches $command ;;
- pick) _stg_unapplied_patches $command ;;
- rename) _stg_all_patches $command ;;
- show) _stg_all_patches $command ;;
+ delete) _stg_patches $command _all_patches ;;
+ edit) _stg_patches $command _applied_patches ;;
+ export) _stg_patches $command _all_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" ;;
+ refresh) _complete_files $command "$(_dirty_files)" ;;
+ 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" ;;
+ resolved) _complete_files $command "$(_conflicting_files)" ;;
+ add) _complete_files $command "$(_unknown_files)" ;;
+# rm) _complete_files $command "$(_known_files)" ;;
+ # commands that usually raher accept branches
+ branch) _complete_branch $command _all_branches ;;
+ rebase) _complete_branch $command _all_branches ;;