mirror of
https://github.com/wavetermdev/inshellisense.git
synced 2026-08-05 13:43:30 -07:00
fix: where starting input goes between command executions in session duration
Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
@@ -30,8 +30,9 @@ export const action = async (options: RootCommandOptions) => {
|
||||
let executed = false;
|
||||
const commands = [];
|
||||
let result: ExecuteShellCommandTTYResult = { code: 0 };
|
||||
let startingCommand = options.command;
|
||||
while (options.duration === "session" || !executed) {
|
||||
const commandToExecute = await render(options.command);
|
||||
const commandToExecute = await render(startingCommand);
|
||||
|
||||
if (commandToExecute == null) {
|
||||
result = { code: 0 };
|
||||
@@ -41,6 +42,7 @@ export const action = async (options: RootCommandOptions) => {
|
||||
commands.push(commandToExecute);
|
||||
result = await executeShellCommandTTY(shell, commandToExecute);
|
||||
executed = true;
|
||||
startingCommand = undefined;
|
||||
}
|
||||
await saveCommand(commands);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user