mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 21:31:19 +08:00 
			
		
		
		
	fix(init): add cached completions directory only once (#12551)
Double quotes within the subscript test are interpreted literally, making the test never match. On subsequent runs, the `$ZSH_CACHE_DIR/completions` directory is always prepended to `$fpath`, even if it is already there. This commit fixes that. Fixes #12551 Co-authored-by: Adem Simsek <adem@simsek.dev>
This commit is contained in:
		
							parent
							
								
									fa583cfb87
								
							
						
					
					
						commit
						11ca9e2ac7
					
				@ -65,7 +65,7 @@ fi
 | 
			
		||||
 | 
			
		||||
# Create cache and completions dir and add to $fpath
 | 
			
		||||
mkdir -p "$ZSH_CACHE_DIR/completions"
 | 
			
		||||
(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
 | 
			
		||||
(( ${fpath[(ie)$ZSH_CACHE_DIR/completions]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
 | 
			
		||||
 | 
			
		||||
# Check for updates on initial load...
 | 
			
		||||
source "$ZSH/tools/check_for_upgrade.sh"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user