Skip to content

Commit

Permalink
Move Generator to top
Browse files Browse the repository at this point in the history
  • Loading branch information
BalliAsghar committed Dec 9, 2024
1 parent 9b6621f commit 617c3d7
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/uv.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
// ////////////////////////////////////////////////////////////////// Generators //////////////////////////////////////////////////////////////////

const dependenciesGenerator: Fig.Generator = {
script: {
command: "sh",
args: [
"-c",
"cat pyproject.toml | grep 'dependencies = ' -A 10 | grep -Eo '\"[^\"]+\"' | cut -d'>' -f1 | tr -d '\"'",
],
},
postProcess: (out) => {
return out.split("\n").map((line) => {
return {
name: line,
description: "Dependency",
};
});
},
};

// ////////////////////////////////////////////////////////////////// Options //////////////////////////////////////////////////////////////////
const indexOptions: Fig.Option[] = [
{
Expand Down Expand Up @@ -548,24 +568,6 @@ const removeOptions: Fig.Option[] = [
},
];

const dependenciesGenerator: Fig.Generator = {
script: {
command: "sh",
args: [
"-c",
"cat pyproject.toml | grep 'dependencies = ' -A 10 | grep -Eo '\"[^\"]+\"' | cut -d'>' -f1 | tr -d '\"'",
],
},
postProcess: (out) => {
return out.split("\n").map((line) => {
return {
name: line,
description: "Dependency",
};
});
},
};

// sync
const syncOptions: Fig.Option[] = [
{
Expand Down

0 comments on commit 617c3d7

Please sign in to comment.