Skip to content

Commit

Permalink
feat: add changed files generator
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrnt committed May 25, 2021
1 parent e661c77 commit 68a2e37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dev/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ const gitGenerators: Record<string, Fig.Generator> = {
});
},
},
getUnstagedFiles: {
script: "git diff --name-only",
splitOn: "\n",
},
};

const head = {
Expand Down Expand Up @@ -1268,7 +1272,7 @@ export const completionSpec: Fig.Spec = {
name: "commit",
isOptional: true,
suggestions: [{ name: "HEAD" }],
generators: gitGenerators.commits,
generators: [gitGenerators.commits, gitGenerators.getUnstagedFiles],
},
},
{
Expand Down

0 comments on commit 68a2e37

Please sign in to comment.