Add tako workon plugin
This commit is contained in:
parent
f3ab52aab0
commit
e5a3fd3b82
4 changed files with 4 additions and 20 deletions
|
|
@ -16,7 +16,6 @@ source_many($HOME + '/.config/tako/completers', is_tako)
|
|||
|
||||
$TAKO_SETTINGS.auto_pushd = True
|
||||
|
||||
$WORKON_HOME = $HOME + '/.virtualenvs'
|
||||
$XDG_CONFIG_HOME = $HOME + '/.config'
|
||||
$EDITOR = 'emacs'
|
||||
$VISUAL = $EDITOR
|
||||
|
|
@ -30,22 +29,6 @@ for path in [
|
|||
|
||||
$LS_COLORS = $(dircolors @($HOME + '/.config/zsh/dircolors.256dark'))[len("LS_COLORS='"):-len("';\nexport LS_COLORS")]
|
||||
|
||||
def _workon(args, stdin=None):
|
||||
if len(args) < 1:
|
||||
return 'Need name of virtualenv\n'
|
||||
|
||||
source_order = [
|
||||
'preactivate',
|
||||
'activate',
|
||||
'postactivate',
|
||||
]
|
||||
|
||||
for f in filter(os.path.isfile, [
|
||||
os.path.join($WORKON_HOME, args[0], 'bin', '{}.tako'.format(name))
|
||||
for name in source_order
|
||||
]):
|
||||
source @(f)
|
||||
|
||||
def _sympy(args, stdin=None):
|
||||
source @($HOME + '/.config/tako/sympy.tako')
|
||||
|
||||
|
|
@ -66,7 +49,6 @@ $TAKO_SETTINGS.aliases.update({
|
|||
'units': 'units --verbose',
|
||||
'trr': 'transmission-remote',
|
||||
'vol': 'pulseaudio-ctl set',
|
||||
'workon': _workon,
|
||||
'octave': 'octave-cli',
|
||||
'bc': 'bc -l',
|
||||
'sympy': _sympy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue