mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-17 01:19:31 +01:00
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.
This commit is contained in:
parent
f4caf44eb0
commit
e5e0f26b90
@ -87,7 +87,7 @@ sub postprocess {
|
|||||||
|
|
||||||
my $ulimits = "ulimit -f 2000; ulimit -t 8; ulimit -u 200";
|
my $ulimits = "ulimit -f 2000; ulimit -t 8; ulimit -u 200";
|
||||||
|
|
||||||
my @args = split_line($self->{arguments}, strip_quotes => 1, preserve_escapes => 1);
|
my @args = split_line($self->{arguments}, strip_quotes => 1, preserve_escapes => 0);
|
||||||
|
|
||||||
my $quoted_args = '';
|
my $quoted_args = '';
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ sub process_interactive_edit($self) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub process_standard_options($self) {
|
sub process_standard_options($self) {
|
||||||
my @opt_args = split_line($self->{code}, preserve_escapes => 1, keep_spaces => 0);
|
my @opt_args = split_line($self->{code}, preserve_escapes => 1, keep_spaces => 1);
|
||||||
|
|
||||||
my $getopt_error;
|
my $getopt_error;
|
||||||
local $SIG{__WARN__} = sub {
|
local $SIG{__WARN__} = sub {
|
||||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4816,
|
BUILD_REVISION => 4817,
|
||||||
BUILD_DATE => "2024-10-29",
|
BUILD_DATE => "2024-10-30",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
Reference in New Issue
Block a user