@@ -174,12 +174,24 @@ function __fish_stg_mail_aliases
174
174
| cut -d. -f 3
175
175
end
176
176
177
- function __fish_stg_diff_opts
177
+ function __fish_stg_git_diff_opts
178
178
__fish_stg_git diff-tree --git-completion-helper \
179
179
| string split ' ' \
180
180
| string match --regex '\--.+'
181
181
end
182
182
183
+ function __fish_stg_git_format_patch_opts
184
+ __fish_stg_git format-patch --git-completion-helper \
185
+ | string split ' ' \
186
+ | string match --regex '\--.+'
187
+ end
188
+
189
+ function __fish_stg_git_send_email_opts
190
+ __fish_stg_git send-email --git-completion-helper \
191
+ | string split ' ' \
192
+ | string match --regex '\--.+'
193
+ end
194
+
183
195
complete -c stg -n __fish_stg_needs_command -xa '(stg completion list commands-and-aliases --style=fish)'
184
196
complete -c stg -n __fish_stg_needs_command -s C -xa '(__fish_complete_directories)' -d 'Run as if started in this directory'
185
197
complete -c stg -n __fish_stg_needs_command -l color -a 'auto always ansi never' -d 'When to colorize output'
@@ -346,7 +358,9 @@ fn get_arg_completion_params(arg: &clap::Arg) -> ShStream {
346
358
"branch" | "ref-branch" => params. word ( "-xa '(__fish_stg_stg_branches)'" ) ,
347
359
"branch-any" => params. word ( "-xa '(__fish_stg_all_branches)'" ) ,
348
360
"committish" => params. word ( "-xa '(__fish_stg_commit)'" ) ,
349
- "diff-opts" => params. word ( "-xa '(__fish_stg_diff_opts)'" ) ,
361
+ "diff-opts" => params. word ( "-xa '(__fish_stg_git_diff_opts)'" ) ,
362
+ "git-format-patch-opts" => params. word ( "-xa '(__fish_stg_git_format_patch_opts)'" ) ,
363
+ "git-send-email-opts" => params. word ( "-xa '(__fish_stg_git_send_email_opts)'" ) ,
350
364
"patch" | "patchranges" => params. word ( "-kxa '(__fish_stg_patches -A -U)'" ) ,
351
365
"patchranges-all" | "set-tree" | "stgit-revision" => {
352
366
params. word ( "-kxa '(__fish_stg_patches --all)'" )
0 commit comments