Quote user input before globbing
This commit is contained in:
		
							parent
							
								
									aaf2089247
								
							
						
					
					
						commit
						3f752d9dc3
					
				| 
						 | 
					@ -51,7 +51,10 @@
 | 
				
			||||||
(define (dir-executables/prefix dir prefix)
 | 
					(define (dir-executables/prefix dir prefix)
 | 
				
			||||||
  (if (file-readable? dir)
 | 
					  (if (file-readable? dir)
 | 
				
			||||||
      (map file-name-nondirectory
 | 
					      (map file-name-nondirectory
 | 
				
			||||||
           (let ((files (glob (string-append dir "/" prefix "*"))))
 | 
					           (let ((files (glob (string-append (glob-quote dir)
 | 
				
			||||||
 | 
					                                             "/"
 | 
				
			||||||
 | 
					                                             (glob-quote prefix)
 | 
				
			||||||
 | 
					                                             "*"))))
 | 
				
			||||||
              (if *completion-check-executable*
 | 
					              (if *completion-check-executable*
 | 
				
			||||||
                  (filter executable? files)
 | 
					                  (filter executable? files)
 | 
				
			||||||
                  files)))
 | 
					                  files)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue