Remove tako config hacks
This commit is contained in:
parent
f0dd2f3b32
commit
b6ce628e09
1 changed files with 2 additions and 6 deletions
|
|
@ -1,8 +1,4 @@
|
||||||
import re
|
import re
|
||||||
# from tako.tools import COLORS_256
|
|
||||||
|
|
||||||
COLORS_256 = {'COLOR_{}'.format(code): '\x1b[38;5;{}m'.format(code) for code in range(256)}
|
|
||||||
COLORS_256['NO_COLOR'] = '\x1b[0m'
|
|
||||||
|
|
||||||
$TAKO_SETTINGS.auto_pushd = True
|
$TAKO_SETTINGS.auto_pushd = True
|
||||||
|
|
||||||
|
|
@ -46,8 +42,8 @@ else:
|
||||||
def git_branch():
|
def git_branch():
|
||||||
ref=$(git symbolic-ref HEAD err> /dev/null)
|
ref=$(git symbolic-ref HEAD err> /dev/null)
|
||||||
if not ref: return None
|
if not ref: return None
|
||||||
prefix = COLORS_256['COLOR_' + str(colors['gray'])] + ':'
|
prefix = colorize('gray', ':')
|
||||||
branch = COLORS_256['COLOR_' + str(colors['orange'])] + re.sub('^refs/heads/', '', ref.strip())
|
branch = colorize('orange', re.sub('^refs/heads/', '', ref[0].strip()))
|
||||||
return prefix + branch
|
return prefix + branch
|
||||||
|
|
||||||
$TAKO_SETTINGS.prompt_fields['git_branch'] = git_branch
|
$TAKO_SETTINGS.prompt_fields['git_branch'] = git_branch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue