forked from qt-creator/qt-creator
CommandLine: Reuse new c'tor
Change-Id: Id154881b4f5d8c488e5c1f5e0f843d36bf838759 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -133,7 +133,7 @@ void ShellIntegration::onOsc(int cmd, std::string_view str, bool initial, bool f
|
||||
qCDebug(integrationLog) << "OSC 133:" << data;
|
||||
} else if (cmd == 633 && command.length() == 1) {
|
||||
if (command[0] == 'E') {
|
||||
CommandLine cmdLine = CommandLine::fromUserInput(data.toString());
|
||||
const CommandLine cmdLine = CommandLine::fromUserInput(data.toString());
|
||||
emit commandChanged(cmdLine);
|
||||
} else if (command[0] == 'D') {
|
||||
emit commandChanged({});
|
||||
@@ -174,12 +174,10 @@ void ShellIntegration::prepareProcess(Utils::Process &process)
|
||||
m_tempDir.filePath(filesToCopy.bash.rcFile.fileName()));
|
||||
rcPath.copyFile(tmpRc);
|
||||
|
||||
CommandLine newCmd = {cmd.executable(), {"--init-file", tmpRc.nativePath()}};
|
||||
|
||||
if (cmd.arguments() == "-l")
|
||||
env.set("VSCODE_SHELL_LOGIN", "1");
|
||||
|
||||
cmd = newCmd;
|
||||
cmd = {cmd.executable(), {"--init-file", tmpRc.nativePath()}};
|
||||
} else if (cmd.executable().baseName() == "zsh") {
|
||||
for (const FileToCopy &file : filesToCopy.zsh.files) {
|
||||
const auto copyResult = file.source.copyFile(
|
||||
|
||||
@@ -83,7 +83,7 @@ void TerminalWidget::setupPty()
|
||||
{
|
||||
m_process = std::make_unique<Process>();
|
||||
|
||||
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
|
||||
const CommandLine shellCommand = m_openParameters.shellCommand.value_or(
|
||||
CommandLine{settings().shell(), settings().shellArguments(), CommandLine::Raw});
|
||||
|
||||
if (shellCommand.executable().isRootPath()) {
|
||||
|
||||
Reference in New Issue
Block a user