1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 05:39:15 +00:00

adding dotfile specific variables for templating

This commit is contained in:
deadc0de6
2019-05-02 11:23:52 +02:00
parent d7168285a5
commit ad10adef5d
7 changed files with 122 additions and 35 deletions

View File

@@ -68,12 +68,12 @@ class Action(Cmd):
def __repr__(self):
return 'action({})'.format(self.__str__())
def execute(self, templater=None, newvars={}):
def execute(self, templater=None):
"""execute the action in the shell"""
ret = 1
action = self.action
if templater:
action = templater.generate_string(self.action, tmpvars=newvars)
action = templater.generate_string(self.action)
try:
cmd = action.format(*self.args)
except IndexError: