mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
completions/xdg-mime: fix off-by-one error and allow multiple filetypes
This commit is contained in:
parent
2915c525fa
commit
26ea024e74
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue