summaryrefslogtreecommitdiff
path: root/tpl/_debug.tpl
diff options
context:
space:
mode:
authorglenda <glenda@9front.local>2020-11-15 15:13:27 +0000
committerglenda <glenda@9front.local>2020-11-15 15:13:27 +0000
commit39318169e0b50551db511851829f9337c5fa6313 (patch)
tree65a0ef5c1da9677532fa8105293d017919473057 /tpl/_debug.tpl
Import site to git
Diffstat (limited to 'tpl/_debug.tpl')
-rw-r--r--tpl/_debug.tpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/tpl/_debug.tpl b/tpl/_debug.tpl
new file mode 100644
index 0000000..4d650ea
--- /dev/null
+++ b/tpl/_debug.tpl
@@ -0,0 +1,29 @@
+% 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
+