diff --git a/share/completions/pygmentize.fish b/share/completions/pygmentize.fish index aefa7bc65..8e3c0fe7a 100644 --- a/share/completions/pygmentize.fish +++ b/share/completions/pygmentize.fish @@ -1,8 +1,12 @@ function __fish_print_pygmentize - set -l lines (pygmentize -L $argv[1] | string match -r '^(?:\* | ).*(?:)$' | string replace -r '\* (.*):$' '$1' | string replace -r '^(.*).$' '$1' | string trim) + set -l lines (pygmentize -L $argv[1] | string match -r '^(?:\* | ).*(?:)$' | string replace -r '\* (.*):$' '$1' | string replace -r '^(.*)\.$' '$1' | string trim) while set -q lines[2] - printf '%s\t%s\n' $lines[1] $lines[2] + set -l names (string split ", " $lines[1]) + for name in $names + printf '%s\t%s\n' $name $lines[2] + end + set -e lines[1] set -e lines[1] end