Add basic support for task completion
This commit is contained in:
@@ -4,5 +4,13 @@ import { Config } from "../types/config";
|
||||
|
||||
export function loadConfig(file: string): Config {
|
||||
const text = fs.readFileSync(file, 'utf-8');
|
||||
return yaml.parse(text) as Config;
|
||||
const cfg = yaml.parse(text) as Config;
|
||||
|
||||
for (const profile of Object.keys(cfg.profiles)) {
|
||||
if (cfg.profiles[profile]) {
|
||||
cfg.profiles[profile].name = profile;
|
||||
}
|
||||
}
|
||||
|
||||
return cfg;
|
||||
}
|
||||
Reference in New Issue
Block a user