1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

attempt to get colors working on windows

This commit is contained in:
Kelly Brazil
2021-05-16 17:43:05 -07:00
parent b1e95a60a2
commit fd411fd772

View File

@ -491,6 +491,9 @@ def main():
except AttributeError:
pass
# enable colors for Windows cmd.exe terminal
os.system('')
# parse magic syntax first: e.g. jc -p ls -al
magic_options = []
valid_command, run_command, magic_found_parser, magic_options = magic_parser(sys.argv)
@ -562,7 +565,7 @@ def main():
sys.exit(combined_exit_code(magic_exit_code, JC_ERROR_EXIT))
elif run_command is not None:
jc.utils.error_message(f'Parser not found for "{run_command_str}". Use "jc -h" for help.')
jc.utils.error_message(f'"{run_command_str}" cannot be used with Magic syntax. Use "jc -h" for help.')
sys.exit(combined_exit_code(magic_exit_code, JC_ERROR_EXIT))
# find the correct parser