Skip to content

Commit 7f355cd

Browse files
committed
fix(uv): fixed dependenciesGenerator
1 parent f84c921 commit 7f355cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/uv.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
const dependenciesGenerator: Fig.Generator = {
44
script: {
5-
command: "sh",
5+
command: "bash",
66
args: [
77
"-c",
8-
"cat pyproject.toml | grep 'dependencies = ' -A 10 | grep -Eo '\"[^\"]+\"' | cut -d'>' -f1 | tr -d '\"'",
8+
'awk \'/dependencies = \\[/ {f=1; next} /\\]/ {f=0} f && /"/ {line = $0; gsub(/^[ \\t]*"/, "", line); sub(/>=.*$/, "", line); gsub(/",?$/, "", line); print line}\' pyproject.toml',
99
],
1010
},
1111
postProcess: (out) => {
1212
return out.split("\n").map((line) => {
1313
return {
1414
name: line,
1515
description: "Dependency",
16+
icon: "📦",
1617
};
1718
});
1819
},

0 commit comments

Comments
 (0)