fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a9618477e
master
1function __krita_complete_image_format 2set -l previous_token( commandline -xc)[ -1 ] 3set -l current_token( commandline -t) 4 5if test " $previous_token " = --new-image 6switch $current_token 7case '*,*,*' 8# nothing is completed as arbitrary width and height are expected 9case '*,' 10printf '%s,\n' U8 U16 F16 F32| 11string replace -r'^' $current_token 12case '*' 13printf '%s,\n' RGBA XYZA LABA CMYKA GRAY YCbCrA 14end 15end 16end 17 18function __krita_list_workspaces 19path basename ~/.local/share/krita/workspaces/*.kws| 20path change-extension'' 21end 22 23complete -c krita -s h -l help -d'show help' 24complete -c krita -l help-all -d'show help with Qt options' 25complete -c krita -s v -l version -d'show version' 26 27complete -c krita -l export -d'export file as image' 28complete -c krita -l export-pdf -d'export file as PDF' 29complete -c krita -l export-sequence -d'export animation as sequence' 30 31complete -c krita -l export-filename -d'exported filename' -n'__fish_seen_subcommand_from --export --export-pdf --export-sequence' -r 32 33complete -c krita -l template -d'open template' -r 34 35complete -c krita -l nosplash -d'hide splash screen' 36complete -c krita -l canvasonly -d'open with canvasonly mode' 37complete -c krita -l fullscreen -d'open with fullscreen mode' 38complete -c krita -l workspace -d'open with workspace' -a'(__krita_list_workspaces)' -x 39complete -c krita -l file-layer -d'open with file-layer' -r 40complete -c krita -l resource-location -d'open with resource' -r 41 42complete -c krita -l new-image -d'open with new image' 43complete -c krita -a'(__krita_complete_image_format)' -x