diff --git a/shtpl/shtpl b/shtpl/shtpl index ad3afd5..0e09729 100755 --- a/shtpl/shtpl +++ b/shtpl/shtpl @@ -79,7 +79,7 @@ param() # debug name value params[$name]="${value:-true}" case "$name" in - h|help) need_help=true; params[h]="${value:-true}"; params[help]="${value:-true}" ;; + h|help) need_help=true; params[h]="${value:-true}"; params[help]="${value:-true}" ;; v|verbose) _verbose=true; params[v]="${value:-true}"; params[verbose]="${value:-true}" ;; p|pipable) isPipable=true; params[p]="${value:-true}"; params[pipable]="${value:-true}" ;; esac @@ -116,7 +116,7 @@ debug args opts mandatories envs params file need_help _verbose isPipable __shtpl_path__=$(realpath $0) __shtpl_dir__=$(dirname $0) -__tpl_path__=$(realpath $1) +__tpl_path__=$(realpath $file) __tpl_name__=$(basename $__tpl_path__) __tpl_dir__=$(dirname $__tpl_path__) @@ -148,11 +148,9 @@ slug() # Execution -eval "echo \"$(cat $1 | sed ' +eval "echo \"$(cat $file | sed ' # Suppress hashbang 1{ /#\!.*shtpl.*/ d } # Excape quotes s/"/\\"/g ')\"" - -