We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef52ac commit 583d6c9Copy full SHA for 583d6c9
src/git.ts
@@ -126,11 +126,16 @@ export const gitGenerators: Record<string, Fig.Generator> = {
126
return [];
127
}
128
129
- return output.split("\n").map((line) => {
+ const lines = output.split("\n");
130
+ const firstLine = lines.length > 0 ? lines[0] : undefined;
131
+ const hashLength = firstLine && firstLine.length > 0 ? firstLine.indexOf(' ') : 7;
132
+ const descriptionStart = hashLength + 1;
133
+
134
+ return lines.map((line) => {
135
return {
- name: line.substring(0, 7),
136
+ name: line.substring(0, hashLength),
137
icon: "fig://icon?type=node",
- description: line.substring(7),
138
+ description: line.substring(descriptionStart),
139
};
140
});
141
},
0 commit comments