mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 00:27:23 +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 @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 = '';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -53,7 +53,7 @@ sub process_interactive_edit($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;
 | 
			
		||||
    local $SIG{__WARN__} = sub {
 | 
			
		||||
 | 
			
		||||
@ -25,8 +25,8 @@ use PBot::Imports;
 | 
			
		||||
# These are set by the /misc/update_version script
 | 
			
		||||
use constant {
 | 
			
		||||
    BUILD_NAME     => "PBot",
 | 
			
		||||
    BUILD_REVISION => 4816,
 | 
			
		||||
    BUILD_DATE     => "2024-10-29",
 | 
			
		||||
    BUILD_REVISION => 4817,
 | 
			
		||||
    BUILD_DATE     => "2024-10-30",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
sub initialize {}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user