@@ -12,6 +12,7 @@ export interface IPythonSettings {
1212 formatting : IFormattingSettings ;
1313 unitTest : IUnitTestSettings ;
1414 autoComplete : IAutoCompeteSettings ;
15+ terminal : ITerminalSettings ;
1516}
1617export interface IUnitTestSettings {
1718 nosetestsEnabled : boolean ;
@@ -66,6 +67,10 @@ export interface IFormattingSettings {
6667export interface IAutoCompeteSettings {
6768 extraPaths : string [ ] ;
6869}
70+ export interface ITerminalSettings {
71+ executeInFileDir : boolean ;
72+ }
73+
6974const systemVariables : SystemVariables = new SystemVariables ( ) ;
7075export class PythonSettings extends EventEmitter implements IPythonSettings {
7176 private static pythonSettings : PythonSettings = new PythonSettings ( ) ;
@@ -135,6 +140,14 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
135140 this . unitTest . nosetestArgs = this . unitTest . nosetestArgs . map ( arg => systemVariables . resolveAny ( arg ) ) ;
136141 this . unitTest . pyTestArgs = this . unitTest . pyTestArgs . map ( arg => systemVariables . resolveAny ( arg ) ) ;
137142 this . unitTest . unittestArgs = this . unitTest . unittestArgs . map ( arg => systemVariables . resolveAny ( arg ) ) ;
143+
144+ let terminalSettings = systemVariables . resolveAny ( pythonSettings . get < ITerminalSettings > ( 'terminal' ) ) ;
145+ if ( this . terminal ) {
146+ Object . assign < ITerminalSettings , ITerminalSettings > ( this . terminal , terminalSettings ) ;
147+ }
148+ else {
149+ this . terminal = terminalSettings ;
150+ }
138151 }
139152
140153 public pythonPath : string ;
@@ -143,6 +156,7 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
143156 public formatting : IFormattingSettings ;
144157 public autoComplete : IAutoCompeteSettings ;
145158 public unitTest : IUnitTestSettings ;
159+ public terminal : ITerminalSettings ;
146160}
147161
148162function getAbsolutePath ( pathToCheck : string , rootDir : String ) : string {
0 commit comments