...
 
Commits (2)
......@@ -215,6 +215,9 @@ class Schema(dict):
def script(self, *jobs):
for job in self.values():
if not job.get('script', ''):
continue
yield 'shyml_' + job.name + '() {'
if job.help:
for line in job.help.strip().split('\n'):
......@@ -242,7 +245,7 @@ class Schema(dict):
'\n',
'\n'.join([f'- {i}' for i in sorted(self.keys())]),
]))
yield 'shyml_' + name
yield 'shyml_' + name + ' "$@"'
def parse(self):
with open(self.path, 'r') as f:
......
......@@ -27,4 +27,4 @@ shyml_testrewrite() {
# Test sh.yml
FIXTURE_REWRITE=1 shyml_test
}
shyml_hello
shyml_hello "$@"