mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 21:31:19 +08:00 
			
		
		
		
	aws: add support for AWS CLI v2 autocompletion (#8670)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
This commit is contained in:
		
							parent
							
								
									2f345a3d0c
								
							
						
					
					
						commit
						1ef3d57739
					
				@ -62,6 +62,11 @@ fi
 | 
			
		||||
 | 
			
		||||
# Load awscli completions
 | 
			
		||||
 | 
			
		||||
# AWS CLI v2 comes with its own autocompletion. Check if that is there, otherwise fall back
 | 
			
		||||
if [[ -x /usr/local/bin/aws_completer ]]; then
 | 
			
		||||
  autoload -Uz bashcompinit && bashcompinit
 | 
			
		||||
  complete -C aws_completer aws
 | 
			
		||||
else
 | 
			
		||||
  function _awscli-homebrew-installed() {
 | 
			
		||||
    # check if Homebrew is installed
 | 
			
		||||
    (( $+commands[brew] )) || return 1
 | 
			
		||||
@ -95,3 +100,4 @@ fi
 | 
			
		||||
 | 
			
		||||
  [[ -r $_aws_zsh_completer_path ]] && source $_aws_zsh_completer_path
 | 
			
		||||
  unset _aws_zsh_completer_path _brew_prefix
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user