This commit is contained in:
2024-11-13 01:17:25 -05:00
parent 0ed24ed43b
commit 9ac157315a
10 changed files with 148 additions and 24 deletions
+8 -2
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env bun
import { bashRunAndReturnSync } from "@helpers/bashUtils"
import { dynamicStringHandler } from "@helpers/dynamicStringHandler"
import { getJJConfigByKeyChain } from "@helpers/jjConfigUtils"
async function main() {
@@ -33,9 +34,14 @@ async function main() {
}
const oldArgOrder = remainingArgsCount
remainingArgsCount = 0
const command =
let command =
matchingCommand?.commandForRetrieveKeys + ` ${matchingCommand?.commandForRetrieveKeys?.includes("auto-completion") ? ` auto-completion ${process.argv.join(" ")}` : ""}`
const res = await bashRunAndReturnSync(command)
command = dynamicStringHandler(command, "", process.env, false)
// console.log(command);
const res = await bashRunAndReturnSync({
command
})
// console.log(res)
const newCommands = res?.split("\n") || []
newCommands.push(String(""))
lastArrayOfKeys = []