equal
deleted
inserted
replaced
21 if os.path.exists(historyPath): |
21 if os.path.exists(historyPath): |
22 readline.read_history_file(historyPath) |
22 readline.read_history_file(historyPath) |
23 |
23 |
24 term_with_colors = ['xterm', 'xterm-color', 'xterm-256color', 'linux', 'screen', 'screen-256color', 'screen-bce'] |
24 term_with_colors = ['xterm', 'xterm-color', 'xterm-256color', 'linux', 'screen', 'screen-256color', 'screen-bce'] |
25 if os.environ.get('TERM') in term_with_colors: |
25 if os.environ.get('TERM') in term_with_colors: |
26 green='\033[32m' |
26 green='\001\033[32m\002' |
27 red='\033[31m' |
27 red='\001\033[31m\002' |
28 reset='\033[0m' |
28 reset='\001\033[0m\002' |
29 sys.ps1 = red + '>>> ' + reset |
29 sys.ps1 = red + '>>> ' + reset |
30 sys.ps2 = green + '... ' + reset |
30 sys.ps2 = green + '... ' + reset |
31 del term_with_colors |
31 del term_with_colors |
32 |
32 |
33 atexit.register(save_history) |
33 atexit.register(save_history) |