|
Lines 1497-1514
Link Here
|
| 1497 |
print_info(0, " " + pp.command(x) + "(" + pp.command(short_cmds[x]) + ") " + \ |
1497 |
print_info(0, " " + pp.command(x) + "(" + pp.command(short_cmds[x]) + ") " + \ |
| 1498 |
Known_commands[x].shortHelp()) |
1498 |
Known_commands[x].shortHelp()) |
| 1499 |
print |
1499 |
print |
|
|
1500 |
|
| 1501 |
def guessColourOutput(): |
| 1502 |
if (Config["color"] == -1 and \ |
| 1503 |
((not sys.stdout.isatty()) or \ |
| 1504 |
(gentoolkit.settings["NOCOLOR"] in ["yes","true"]))) \ |
| 1505 |
or \ |
| 1506 |
Config["color"] == 0: |
| 1507 |
pp.output.nocolor() |
| 1500 |
|
1508 |
|
| 1501 |
def configure(): |
1509 |
def configure(): |
| 1502 |
"""Set up default configuration. |
1510 |
"""Set up default configuration. |
| 1503 |
""" |
1511 |
""" |
| 1504 |
|
1512 |
|
| 1505 |
# Guess colour output |
1513 |
guessColourOutput() |
| 1506 |
if (Config["color"] == -1 and \ |
|
|
| 1507 |
((not sys.stdout.isatty()) or \ |
| 1508 |
(gentoolkit.settings["NOCOLOR"] in ["yes","true"]))) \ |
| 1509 |
or \ |
| 1510 |
Config["color"] == 0: |
| 1511 |
pp.output.nocolor() |
| 1512 |
|
1514 |
|
| 1513 |
# Guess piping output |
1515 |
# Guess piping output |
| 1514 |
if not sys.stdout.isatty(): |
1516 |
if not sys.stdout.isatty(): |
|
Lines 1556-1561
Link Here
|
| 1556 |
break |
1558 |
break |
| 1557 |
|
1559 |
|
| 1558 |
if not command and showhelp: |
1560 |
if not command and showhelp: |
|
|
1561 |
guessColourOutput() |
| 1559 |
printUsage() |
1562 |
printUsage() |
| 1560 |
sys.exit(0) |
1563 |
sys.exit(0) |
| 1561 |
|
1564 |
|