diff --git a/share/completions/xdg-mime.fish b/share/completions/xdg-mime.fish index 333919cea..c6c8bf3cf 100644 --- a/share/completions/xdg-mime.fish +++ b/share/completions/xdg-mime.fish @@ -15,8 +15,8 @@ complete -c xdg-mime -d 'Query default application for type' -n 'contains_seq qu complete -c xdg-mime -d 'Query file\'s filetype' -n 'contains_seq query filetype -- (commandline -cxp)' -r # complete xdg-mime default -complete -c xdg-mime -d 'Choose application' -n '__fish_seen_subcommand_from default; and __fish_is_nth_token 3' -xa '(__fish_print_xdg_desktop_file_ids)' -complete -c xdg-mime -d Mimetype -n '__fish_seen_subcommand_from default; and __fish_is_nth_token 4' -xa '(__fish_print_xdg_mimetypes)' +complete -c xdg-mime -d 'Choose application' -n '__fish_seen_subcommand_from default; and test (commandline -xpc|count) -eq 2' -xa '(__fish_print_xdg_desktop_file_ids)' +complete -c xdg-mime -d Mimetype -n '__fish_seen_subcommand_from default; and test (commandline -xpc|count) -ge 3' -xa '(__fish_print_xdg_mimetypes)' # complete xdg-mime install complete -c xdg-mime -d 'Add filetype description' -n 'contains_seq xdg-mime install -- (commandline -cxp)' -r