ls color MORE

stable
Valerie 2021-12-22 08:55:48 -05:00
parent 495998383f
commit 8038129027
1 changed files with 12 additions and 1 deletions

View File

@ -14,7 +14,18 @@ export default function ls(flags: any) {
}
for(const [configKey, configVal] of Object.entries(instance.privateScope.config)) {
console.log(' ' + chalk.ansi256(240)(configKey + ': ' + configVal));
const valueString = (function() {
if(typeof configVal === 'number') {
return chalk.ansi256(172)(configVal)
} else if (typeof configVal === 'string'){
return chalk.ansi256(39)('\'' + configVal + '\'')
} else {
return configVal;
}
})()
console.log(' ' + chalk.ansi256(240)(configKey + ': ' + valueString));
}
}
}