werc-1.5.0-tweaks/tpl/_debug.tpl
NunoSempere ae14bd3fbb chore: Update permissions
It's unclear to me how to not commit this and proceed further.
2022-03-10 23:12:17 +00:00

30 lines
683 B
Smarty
Executable File

% if(! ~ $#debug_shell 0) {
<form method="POST" name="prompt">
<input size="80" type="text" name="command" value="%($"post_arg_command%)">
<input type="submit" Value="Run">
</form>
<script language="javascript"><!--
document.prompt.command.focus()
//--></script>
%{
fn evl {
# Buffering is probably messing this up:
#rc -c 'flag x +;{'^$post_arg_command'} |[2] awk ''{print ">> "$0}'''
rc -c 'flag s +; flag x +;'^$post_arg_command
}
if(! ~ $#post_arg_command 0 && ! ~ $#post_arg_command '') {
echo '<hr><pre>'
evl | escape_html |[2] awk '{print "<b>"$0"</b>"}'
echo '</pre>'
}
%}
% }
<hr><pre>
% env | escape_html
</pre><hr>
% umask