fish-shell/share/functions/__fish_d2__complete_themes.fish
2024-10-02 09:26:52 +10:00

6 lines
186 B
Fish

function __fish_d2__complete_themes
d2 themes |
sed -n '3,$p' |
string match --entire --regex '^-' |
string replace --regex -- '- ([^:]+): (.+)' '$2\t$1'
end