From 0bcc686b0036bc6adce197595c8e2dbc4973961f Mon Sep 17 00:00:00 2001 From: GGONZALEZ180 Date: Wed, 19 Jul 2023 16:34:18 -0400 Subject: [PATCH 1/3] inital change --- src/git.ts | 6 +++--- src/gt.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/git.ts b/src/git.ts index 10e5442c70a..cd3a0faf491 100644 --- a/src/git.ts +++ b/src/git.ts @@ -4342,13 +4342,13 @@ const completionSpec: Fig.Spec = { }, options: [ { - name: ["-m", "--message"], + name: ["-m ''", "--message"], // insertValue: "-m '{cursor}'", description: "Use the given message as the commit message", args: { name: "message", generators: ai({ - name: "git commit -m", + name: "git commit -m ''", prompt: ({ executeShellCommand }) => { const gitLogShortMessages = executeShellCommand( "git log --pretty=format:%s --abbrev-commit --max-count=20" @@ -6802,7 +6802,7 @@ const completionSpec: Fig.Spec = { }, { name: ["-m", "--message"], - insertValue: "-m {cursor}", + insertValue: "-m '{cursor}'", description: "Use the given as the stash message", args: { name: "message", diff --git a/src/gt.ts b/src/gt.ts index 6bf3c71dc37..9601409191a 100644 --- a/src/gt.ts +++ b/src/gt.ts @@ -375,7 +375,7 @@ const completionSpec: Fig.Spec = { description: "Stage all changes before committing", }, { - name: ["--message", "-m"], + name: ["--message ''", "-m ''"], description: "The updated message for the commit", args: { name: "message", From 6bfb8f31107b8e49589d514b493e35622555d881 Mon Sep 17 00:00:00 2001 From: GGONZALEZ180 Date: Wed, 26 Jul 2023 13:29:12 -0400 Subject: [PATCH 2/3] new history spec --- src/history.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/history.ts diff --git a/src/history.ts b/src/history.ts new file mode 100644 index 00000000000..938f036865b --- /dev/null +++ b/src/history.ts @@ -0,0 +1,29 @@ +const completionSpec: Fig.Spec = { + name: "history", + description: "Shows last 15 commands", + subcommands: [ + { + name: "0", + description: "Shows full command history", + }, + { + name: "|", + description: "Divider to run other commands on history", + subcommands: [ + { + name: "grep", + description: "Search history", + }, + ], + }, + ], + options: [ + { + name: ["--clear", "-c"], + description: "Clears history", + }, + ], + // Only uncomment if history takes an argument + // args: {} +}; +export default completionSpec; From 09f05ab9dd53c4abb3ee23eee75b2cf781748151 Mon Sep 17 00:00:00 2001 From: GGONZALEZ180 Date: Wed, 26 Jul 2023 14:00:31 -0400 Subject: [PATCH 3/3] revert changes to git --- src/git.ts | 6 +++--- src/gt.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/git.ts b/src/git.ts index cd3a0faf491..10e5442c70a 100644 --- a/src/git.ts +++ b/src/git.ts @@ -4342,13 +4342,13 @@ const completionSpec: Fig.Spec = { }, options: [ { - name: ["-m ''", "--message"], + name: ["-m", "--message"], // insertValue: "-m '{cursor}'", description: "Use the given message as the commit message", args: { name: "message", generators: ai({ - name: "git commit -m ''", + name: "git commit -m", prompt: ({ executeShellCommand }) => { const gitLogShortMessages = executeShellCommand( "git log --pretty=format:%s --abbrev-commit --max-count=20" @@ -6802,7 +6802,7 @@ const completionSpec: Fig.Spec = { }, { name: ["-m", "--message"], - insertValue: "-m '{cursor}'", + insertValue: "-m {cursor}", description: "Use the given as the stash message", args: { name: "message", diff --git a/src/gt.ts b/src/gt.ts index 9601409191a..6bf3c71dc37 100644 --- a/src/gt.ts +++ b/src/gt.ts @@ -375,7 +375,7 @@ const completionSpec: Fig.Spec = { description: "Stage all changes before committing", }, { - name: ["--message ''", "-m ''"], + name: ["--message", "-m"], description: "The updated message for the commit", args: { name: "message",