Skip to content

Commit

Permalink
feat: use postProcess and script instead of custom
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrnt committed May 23, 2021
1 parent 58391c2 commit 3758440
Show file tree
Hide file tree
Showing 2 changed files with 2,513 additions and 2,343 deletions.
9 changes: 4 additions & 5 deletions dev/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,12 @@ const gitGenerators: Record<string, Fig.Generator> = {

// Files for staging
files_for_staging: {
custom: async (context, runFigCommand) => {
const out = await runFigCommand("git status --short");

if (out.startsWith("fatal:")) {
script: "git status --short",
postProcess: (output, context) => {
if (output.startsWith("fatal:")) {
return [];
}
const items = out.split("\n").map((file) => {
const items = output.split("\n").map((file) => {
file = file.trim();
const arr = file.split(" ");

Expand Down
Loading

0 comments on commit 3758440

Please sign in to comment.