Use the basename of which_editor
I had EDITOR set to /usr/local/bin/mate set and got the whole of /usr/local opened in TextMate which takes fricking forever!
This commit is contained in:
		
							parent
							
								
									ae4ea06e22
								
							
						
					
					
						commit
						6626966ddd
					
				@ -4,7 +4,7 @@ module Homebrew extend self
 | 
			
		||||
  def edit
 | 
			
		||||
    # If no brews are listed, open the project root in an editor.
 | 
			
		||||
    if ARGV.named.empty?
 | 
			
		||||
      editor = which_editor
 | 
			
		||||
      editor = File.basename which_editor
 | 
			
		||||
      if editor == "mate"
 | 
			
		||||
        # If the user is using TextMate, give a nice project view instead.
 | 
			
		||||
        exec 'mate', HOMEBREW_REPOSITORY+"bin/brew",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user