|
Lines 1479-1496
Link Here
|
| 1479 |
print_info(0, " " + pp.command(x) + "(" + pp.command(short_cmds[x]) + ") " + \ |
1479 |
print_info(0, " " + pp.command(x) + "(" + pp.command(short_cmds[x]) + ") " + \ |
| 1480 |
Known_commands[x].shortHelp()) |
1480 |
Known_commands[x].shortHelp()) |
| 1481 |
print |
1481 |
print |
| 1482 |
|
|
|
| 1483 |
def configure(): |
| 1484 |
"""Set up default configuration. |
| 1485 |
""" |
| 1486 |
|
1482 |
|
| 1487 |
# Guess colour output |
1483 |
def guessColourOutput(): |
| 1488 |
if (Config["color"] == -1 and \ |
1484 |
if (Config["color"] == -1 and \ |
| 1489 |
((not sys.stdout.isatty()) or \ |
1485 |
((not sys.stdout.isatty()) or \ |
| 1490 |
(gentoolkit.settings["NOCOLOR"] in ["yes","true"]))) \ |
1486 |
(gentoolkit.settings["NOCOLOR"] in ["yes","true"]))) \ |
| 1491 |
or \ |
1487 |
or \ |
| 1492 |
Config["color"] == 0: |
1488 |
Config["color"] == 0: |
| 1493 |
pp.output.nocolor() |
1489 |
pp.output.nocolor() |
|
|
1490 |
|
| 1491 |
def configure(): |
| 1492 |
"""Set up default configuration. |
| 1493 |
""" |
| 1494 |
guessColourOutput() |
| 1494 |
|
1495 |
|
| 1495 |
# Guess piping output |
1496 |
# Guess piping output |
| 1496 |
if not sys.stdout.isatty(): |
1497 |
if not sys.stdout.isatty(): |
|
Lines 1538-1543
Link Here
|
| 1538 |
break |
1539 |
break |
| 1539 |
|
1540 |
|
| 1540 |
if not command and showhelp: |
1541 |
if not command and showhelp: |
|
|
1542 |
guessColourOutput() |
| 1541 |
printUsage() |
1543 |
printUsage() |
| 1542 |
sys.exit(0) |
1544 |
sys.exit(0) |
| 1543 |
|
1545 |
|