mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Default file masks .bashrc and .profile for UNIX Shell Script highlighter
Override GetDefaultFilter / GetInitialDefaultFileFilterMask on TSynUNIXShellScriptSynEx so the editor recognizes .bashrc and .profile in addition to *.sh.
This commit is contained in:
parent
86cb17aa1b
commit
9be7a75e48
1 changed files with 14 additions and 0 deletions
|
|
@ -101,6 +101,11 @@ type
|
|||
TSynUNIXShellScriptSynEx = class(TSynUNIXShellScriptSyn)
|
||||
protected
|
||||
function GetSampleSource: string; override;
|
||||
{$IF DEFINED(LCL_VER_499)}
|
||||
function GetInitialDefaultFileFilterMask: string; override;
|
||||
{$ELSE}
|
||||
function GetDefaultFilter: string; override;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{ TSynPlainTextHighlighter }
|
||||
|
|
@ -334,6 +339,15 @@ begin
|
|||
'# Text Block'#13#10 + #13#10;
|
||||
end;
|
||||
|
||||
{$IF DEFINED(LCL_VER_499)}
|
||||
function TSynUNIXShellScriptSynEx.GetInitialDefaultFileFilterMask: string;
|
||||
{$ELSE}
|
||||
function TSynUNIXShellScriptSynEx.GetDefaultFilter: string;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result:= 'UNIX Shell Script (*.sh,.bashrc,.profile)|*.sh;.bashrc;.profile';
|
||||
end;
|
||||
|
||||
{ TSynPlainTextHighlighter }
|
||||
|
||||
function TSynPlainTextHighlighter.GetSampleSource: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue