Fix 'cut' working cross-platform
This commit is contained in:
		
							parent
							
								
									9b652111d5
								
							
						
					
					
						commit
						b4d75c9070
					
				
							
								
								
									
										7
									
								
								⚡
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								⚡
									
									
									
									
									
								
							| @ -38,7 +38,12 @@ redefine-functions-defined-with-selector-16() { | ||||
| } | ||||
| 
 | ||||
| _subcommands() { | ||||
|   compgen -c ⚡ | cut -c2- | ||||
|   prefix_length=1 | ||||
|   while [[ "$(cut -c ${prefix_length}- <<< "⚡tomato")" != "tomato" ]]; do | ||||
|     prefix_length=$((prefix_length + 1)) | ||||
|   done | ||||
| 
 | ||||
|   compgen -c ⚡ | cut -c ${prefix_length}- | ||||
| } | ||||
| 
 | ||||
| _help-line() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user