The . builtin command now shows the stack too
This commit is contained in:
		@@ -199,8 +199,11 @@ class Shell
 | 
			
		||||
    {
 | 
			
		||||
        switch ($command) {
 | 
			
		||||
            case '.':
 | 
			
		||||
                printf("context<%s>:\n", $this->context->getName());
 | 
			
		||||
                echo "  ".join("\n  ",explode("\n",json_encode($this->context->getData(),JSON_PRETTY_PRINT)))."\n";
 | 
			
		||||
                printf("context<%s>: %s\n", $this->context->getName(), json_encode($this->context->getData()));
 | 
			
		||||
                $level = 0;
 | 
			
		||||
                foreach ($this->contextStack as $context) {
 | 
			
		||||
                    printf(" %s- context<%s>\n", str_repeat("  ",$level++), $context->getName());
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            case '..':
 | 
			
		||||
                if (count($this->contextStack)>0)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user