Add help (:?)
This commit is contained in:
		
							parent
							
								
									e133e91410
								
							
						
					
					
						commit
						4b33c2dd4c
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		
							
								
								
									
										14
									
								
								nix-repl.cc
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								nix-repl.cc
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -248,7 +248,19 @@ void NixRepl::processLine(string line)
 | 
			
		|||
 | 
			
		||||
    string command = string(line, 0, 2);
 | 
			
		||||
 | 
			
		||||
    if (command == ":a") {
 | 
			
		||||
    if (command == ":?") {
 | 
			
		||||
        cout << "The following commands are available:\n"
 | 
			
		||||
             << "\n"
 | 
			
		||||
             << "  <expr>     Evaluate and print expression\n"
 | 
			
		||||
             << "  :a <expr>  Add attributes from resulting set to scope\n"
 | 
			
		||||
             << "  :b <expr>  Build derivation\n"
 | 
			
		||||
             << "  :l <path>  Load Nix expression and add it to scope\n"
 | 
			
		||||
             << "  :p <expr>  Evaluate and print expression recursively\n"
 | 
			
		||||
             << "  :s <expr>  Build dependencies of derivation, then start nix-shell\n"
 | 
			
		||||
             << "  :t <expr>  Describe result of evaluation\n";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    else if (command == ":a") {
 | 
			
		||||
        Value v;
 | 
			
		||||
        evalString(string(line, 2), v);
 | 
			
		||||
        addAttrsToScope(v);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue