From eb1c4b493451188a56a818c1eef6360e805948dc Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 2 Oct 2024 01:51:01 +1000 Subject: [PATCH] feat(completion): support dot command --- share/completions/dot.fish | 21 +++++++ .../__fish_graphviz__print_formats.fish | 58 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 share/functions/__fish_graphviz__print_formats.fish diff --git a/share/completions/dot.fish b/share/completions/dot.fish index a0e013511..adb41757f 100644 --- a/share/completions/dot.fish +++ b/share/completions/dot.fish @@ -204,3 +204,24 @@ complete -c $command -s N \ complete -c $command -s k \ -a 'dot neato fdp sfdp circo twopi nop Pretty-nop2 Pretty-osage patchwork' \ -d 'Specify a render engine for a diagram' + +complete -c $command -s T \ + -a '(__fish_graphviz__print_formats)' \ + -d 'Specify a render engine for a diagram' + +complete -c $command -s l -d 'Specify a library for a diagram' +complete -c $command -s n -f -d 'Specify a no-op flag for neato' +complete -c $command -s o -d 'Specify the output file for a diagram' +complete -c $command -s O -d 'Whether to infer the output file for a diagram' + +complete -c $command -s P \ + -d 'Whether to generate a graph to show plugin configuration of the tool' + +complete -c $command -s q -d 'Whether to suppress warnings for a diagram' +complete -c $command -s s -f -d 'Specify the input scale for a diagram' + +complete -c $command -s x \ + -d 'Whether to isolated nodes and peninsulas of a diagram' + +complete -c $command -s y \ + -d 'Whether to invert the corrdinate system of a diagram' diff --git a/share/functions/__fish_graphviz__print_formats.fish b/share/functions/__fish_graphviz__print_formats.fish new file mode 100644 index 000000000..fdc620199 --- /dev/null +++ b/share/functions/__fish_graphviz__print_formats.fish @@ -0,0 +1,58 @@ +function __fish_graphviz__print_formats + echo bmp \ + cgimage \ + canon \ + dot \ + gv \ + xdot \ + xdot1.2 \ + xdot1.4 \ + eps \ + exr \ + fig \ + gd \ + gd2 \ + gif \ + gtk \ + ico \ + imap \ + imap_np \ + ismap \ + cmap \ + cmapx \ + cmapx_np \ + jpg \ + jpeg \ + jpe \ + 2000 \ + jp2 \ + json \ + json0 \ + dot_json \ + xdot_json \ + pdf \ + pic \ + pct \ + pict \ + plain \ + plain-ext \ + png \ + pov \ + ps \ + ps2 \ + psd \ + sgi \ + svg \ + svgz \ + tga \ + tif \ + tiff \ + tk \ + vml \ + vmlz \ + vrml \ + wbmp \ + webp \ + xlib \ + x11 +end \ No newline at end of file