Bugfixes to help command
This commit is contained in:
		@@ -429,11 +429,14 @@ class Shell
 | 
			
		||||
                    $_($command, $args,$info);
 | 
			
		||||
                }
 | 
			
		||||
                if (count($ghelp)) {
 | 
			
		||||
                    printf("\e[1mCommands from parent contexts:\e[0m\n");
 | 
			
		||||
                    if (strpos($command," ")!==false) {
 | 
			
		||||
                        list($command,$args) = explode(" ",$command,2);
 | 
			
		||||
                    } else $args=null;
 | 
			
		||||
                    $_($command, $args,$info);
 | 
			
		||||
                    foreach ($ghelp as $command=>$info) {
 | 
			
		||||
                        printf("\e[1mCommands from parent contexts:\e[0m\n");
 | 
			
		||||
                        if (strpos($command," ")!==false) {
 | 
			
		||||
                            list($command,$args) = explode(" ",$command,2);
 | 
			
		||||
                        } else $args=null;
 | 
			
		||||
                        if (!array_key_exists($command,$ghelp)) continue;
 | 
			
		||||
                        $_($command, $args,$info);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                printf("\e[1mGlobal commands:\e[0m\n");
 | 
			
		||||
                    $_("exit", null, "Leave the shell");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user