mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Run in terminal from command line
This commit is contained in:
parent
4fd7c7d65f
commit
0db4995eeb
2 changed files with 21 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
rm -f *.o
|
||||
rm -f *.ppu
|
||||
#!/bin/sh
|
||||
rm -f *.o
|
||||
rm -f *.ppu
|
||||
rm -f *.a
|
||||
24
fmain.pas
24
fmain.pas
|
|
@ -357,7 +357,7 @@ type
|
|||
MainSplitterHintWnd: THintWindow;
|
||||
|
||||
procedure ColumnsMenuClick(Sender: TObject);
|
||||
function ExecuteCommandFromEdit(sCmd:String):Boolean;
|
||||
function ExecuteCommandFromEdit(sCmd: String; bRunInTerm: Boolean): Boolean;
|
||||
procedure AddSpecialButtons(dskPanel: TKASToolBar);
|
||||
procedure ReLoadTabs(ANoteBook: TNoteBook);
|
||||
public
|
||||
|
|
@ -1151,7 +1151,7 @@ begin
|
|||
begin
|
||||
// execute command line
|
||||
mbSetCurrentDir(ActiveDir);
|
||||
ExecuteCommandFromEdit(edtCommand.Text);
|
||||
ExecuteCommandFromEdit(edtCommand.Text, False);
|
||||
ClearCmdLine;
|
||||
RefreshPanel;
|
||||
ActiveFrame.SetFocus;
|
||||
|
|
@ -1159,11 +1159,20 @@ begin
|
|||
end;
|
||||
end; //Shift=[]
|
||||
|
||||
// execute active file in terminal (Shift+Enter)
|
||||
// execute active file or command line in terminal (Shift+Enter)
|
||||
if Shift=[ssShift] then
|
||||
begin
|
||||
mbSetCurrentDir(ActiveDir);
|
||||
ExecCmdFork(ActiveDir + pnlFile.GetActiveItem^.sName, True, gRunInTerm);
|
||||
if not edtCommand.Focused then
|
||||
ExecCmdFork(ActiveDir + pnlFile.GetActiveItem^.sName, True, gRunInTerm)
|
||||
else
|
||||
begin
|
||||
// execute command line
|
||||
ExecuteCommandFromEdit(edtCommand.Text, True);
|
||||
ClearCmdLine;
|
||||
RefreshPanel;
|
||||
ActiveFrame.SetFocus;
|
||||
end;
|
||||
Exit;
|
||||
end;
|
||||
// ctrl enter
|
||||
|
|
@ -2808,7 +2817,7 @@ begin
|
|||
end;
|
||||
|
||||
|
||||
function TfrmMain.ExecuteCommandFromEdit(sCmd: String): Boolean;
|
||||
function TfrmMain.ExecuteCommandFromEdit(sCmd: String; bRunInTerm: Boolean): Boolean;
|
||||
var
|
||||
iIndex:Integer;
|
||||
sDir:String;
|
||||
|
|
@ -2843,7 +2852,10 @@ begin
|
|||
edtCommand.Items.Insert(0,sCmd);
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
ExecCmdFork(sCmd, True, gRunInTerm);
|
||||
if bRunInTerm then
|
||||
ExecCmdFork(sCmd, True, gRunInTerm)
|
||||
else
|
||||
ExecCmdFork(sCmd);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF unix}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue