3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 11:59:43 +01:00
Commit Graph

27 Commits

Author SHA1 Message Date
Pragmatic Software
4c866d39b6
Fix white-space handling; add suppress-no-output 2024-11-03 19:26:56 -08:00
Pragmatic Software
bd4fd4ea27
pbot-vm: preserve newlines in split_line() 2024-11-02 18:29:25 -07:00
Pragmatic Software
e5e0f26b90
applets/pbot-vm: minor fixes
* set `preserve_escapes` to 0 in guest/_c_base.pm so escapes are stripped in:

     <pragma-> ,show testcargs
     <candide> [global] testcargs: /code c11 printf("/say args: " ); while
               (*++argv) printf("[%s] " , *argv);
     <pragma-> ,testcargs foo\'bar baz\'qux
     <candide> args: [foo\'bar] [baz\'qux]

  to produce the desired output of:

     <candide> args: [foo'bar] [baz'qux]

* set `keep_spaces` to 1 in host/_default.pm since it turns out that in some
  languages unquoted spaces are significant, e.g. in `sh ${1%  *}` to strip
  text following two spaces. Without `keep_spaces` enabled, `sh ${1%  *}`
  becomes `sh ${1% *}` and strips all text following one space instead of two.
2024-10-30 15:43:38 -07:00
Pragmatic Software
f4caf44eb0
split_line(): Remove no longer used next_ch/last_ch 2024-10-29 12:49:19 -07:00
Pragmatic Software
4287cb9fa2
Fix split_line() quoting to be more sh-like
E.g.:

<pragma-> show testcargs
   <PBot> [global] testcargs: /code c11 printf("/say args: " ); while (*++argv) printf("[%s] " , *argv);
<pragma-> testcargs 'hello''world' 'how are 'you today
   <PBot> args: [helloworld] [how are you] [today]

Previously, adjacent 'foo''bar' would end up as 2 args like [foo] [bar]. Now
they are properly concatenated into one [foobar] argument.

This also fixes the cases of whitespace being inserted after quoted arguments.
2024-10-29 10:19:46 -07:00
Pragmatic Software
4a025801a2
applets/pbot-vm: disregard IRC text modifiers when escaping unprintable characters 2024-10-27 12:52:15 -07:00
Pragmatic Software
6002c93d60
pbot-vm: Fix -paste getting 403 Forbidden 2024-10-01 12:37:45 -07:00
Pragmatic Software
7da755d248
pbot-vm: make clang2x default language; add -Wno-unused-variable 2024-09-19 13:51:57 -07:00
Pragmatic Software
13c117e360
pbot-vm: remove/replace -Wno-unused with -Wno-unused-parameter 2024-08-17 22:17:46 -07:00
Pragmatic Software
17b69f04ff
pbot-vm: massive refactor
* replace heartbeat with health-check
  * instead of steady stream of newlines every 5s, now awaits input
    and responds with `vmstat` output

* more reliably use host/config/vm-exec.json to get libvirt domain name
  for snapshot-revert, server address, serial ports, vagrant setting, etc

* use iptables/nftables to disable networking
  * added guest/bin/disable-network-[iptables,nftables]
  * added guest/bin/enable-network-[iptables,nftables]

* replace ugly ___OUTPUT___ texts in sh, bash, ksh, zsh languages

* documentation updates and tweaks
2024-04-10 01:21:18 -07:00
Pragmatic Software
826fd79d71
pbot-vm: reduce noisy output in Scheme language 2024-04-07 17:19:38 -07:00
Pragmatic Software
91f8547aed
pbot-vm: add Tumbleweed orchestration script
Fix Java language missing `/bin/sh` in execute()
Update brainfck language to use `bff`
2024-03-30 16:49:09 -07:00
Pragmatic Software
59090b39e7
pbot-vm: update VirtualMachine.md with improved PTY console install instructions and misc tweaks 2024-03-27 14:21:32 -07:00
Pragmatic Software
06650963a3 applets/pbot-vm: increase length to trigger "Same output" 2023-04-28 00:48:37 -07:00
Pragmatic Software
3ada433527 Refactor UTF-8 fix 2023-03-12 18:28:50 -07:00
Pragmatic Software
b9a89e10d6 Fix UTF-8 encoding 2023-03-12 18:10:44 -07:00
Pragmatic Software
6565c516e9 pbot-vm: remove "command:" text from -paste output 2023-03-12 16:12:58 -07:00
Pragmatic Software
e736051de5 Fix UTF-8 encoding 2023-03-12 16:06:04 -07:00
Pragmatic Software
4b5d8aa535 pbot-vm: use %02X for escapes; do not escape \x03 (for IRC colors) 2022-04-08 13:12:37 -07:00
Pragmatic Software
3d311296eb pbot-vm: output postprocessing: escape control characters/unprintable characters 2022-04-07 18:24:57 -07:00
Pragmatic Software
1c57e01fad pbot-vm: escape malformed Unicode on STDOUT 2022-04-04 22:32:53 -07:00
Pragmatic Software
4535881898 pbot-vm: fix whitespace issue with "string"[n] 2022-04-04 17:17:57 -07:00
Pragmatic Software
1f3110075a pbot-vm: fix clang2x 2022-03-19 21:50:43 -07:00
Pragmatic Software
02ca5e4435 pbot-vm: add C2X language files; default cc to C2X 2022-03-19 21:31:58 -07:00
Pragmatic Software
76fd5f5fd7 pbot-vm: fix encoding issues; misc clean-ups 2022-02-24 10:39:15 -08:00
Pragmatic Software
3fdfb789df pbot-vm: Fix add_option() 2022-02-15 11:40:06 -08:00
Pragmatic Software
3cfedcf3b8 Rename compiler_vm to pbot-vm and other misc applet updates 2022-02-14 16:33:29 -08:00