install bash completion scripts
Completion itself is not implemented.
This commit is contained in:
		
							
								
								
									
										1
									
								
								debian/api-test-server.bash-completion
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								debian/api-test-server.bash-completion
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					debian/pbs.bash-completion pbs
 | 
				
			||||||
							
								
								
									
										8
									
								
								debian/pbs.bash-completion
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								debian/pbs.bash-completion
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					# pbs bash completion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# see http://tiswww.case.edu/php/chet/bash/FAQ
 | 
				
			||||||
 | 
					# and __ltrim_colon_completions() in /usr/share/bash-completion/bash_completion
 | 
				
			||||||
 | 
					# this modifies global var, but I found no better way
 | 
				
			||||||
 | 
					COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					complete -o default -C 'pbs bashcomplete' pbs
 | 
				
			||||||
							
								
								
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@ -5,5 +5,5 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%:
 | 
					%:
 | 
				
			||||||
	dh $@ --with=systemd
 | 
						dh $@ --with=systemd --with=bash-completion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -87,6 +87,11 @@ pub fn run_cli_command(def: &CommandLineInterface) -> Result<(), Error> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    let args: Vec<String> = std::env::args().skip(1).collect();
 | 
					    let args: Vec<String> = std::env::args().skip(1).collect();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if !args.is_empty() && args[0] == "bashcomplete" {
 | 
				
			||||||
 | 
					        //Fixme: implement bash completion
 | 
				
			||||||
 | 
					        return Ok(());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    match def {
 | 
					    match def {
 | 
				
			||||||
        CommandLineInterface::Simple(cli_cmd) => handle_simple_command(cli_cmd, args),
 | 
					        CommandLineInterface::Simple(cli_cmd) => handle_simple_command(cli_cmd, args),
 | 
				
			||||||
        CommandLineInterface::Nested(map) => handle_nested_command(map, args),
 | 
					        CommandLineInterface::Nested(map) => handle_nested_command(map, args),
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user