Changed plugin logic
This commit is contained in:
		
							parent
							
								
									be81075e22
								
							
						
					
					
						commit
						9bf4e2b60f
					
				@ -5,10 +5,9 @@ function zsh_add_config() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function zsh_add_plugin() {
 | 
					function zsh_add_plugin() {
 | 
				
			||||||
  PLUGIN_NAME=$(echo $1 | cut -d"/" -f2)
 | 
					  PLUGIN_NAME=$(echo $1 | cut -d"/" -f2)
 | 
				
			||||||
  if [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then
 | 
					  if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then
 | 
				
			||||||
    zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
 | 
					 | 
				
			||||||
    zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME"
 | 
					    git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					  zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
 | 
				
			||||||
 | 
					  zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user