mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	added gitk
This commit is contained in:
		
							parent
							
								
									28aa492997
								
							
						
					
					
						commit
						113a58096d
					
				@ -33,15 +33,17 @@ class Action:
 | 
				
			|||||||
    def _unknown(self):
 | 
					    def _unknown(self):
 | 
				
			||||||
        print "unknown action %s for %s" % (self.name,self.path)
 | 
					        print "unknown action %s for %s" % (self.name,self.path)
 | 
				
			||||||
    def terminal(self):
 | 
					    def terminal(self):
 | 
				
			||||||
        print "terminal %s" % self.path
 | 
					 | 
				
			||||||
        if not os.fork():
 | 
					        if not os.fork():
 | 
				
			||||||
            subprocess.Popen(['gnome-terminal',"--default-working-directory='%s'" % self.path]).wait()
 | 
					            subprocess.Popen(['gnome-terminal',"--default-working-directory='%s'" % self.path]).wait()
 | 
				
			||||||
            sys.exit()
 | 
					            sys.exit()
 | 
				
			||||||
    def nautilus(self):
 | 
					    def nautilus(self):
 | 
				
			||||||
        print "nautilus %s" % self.path
 | 
					 | 
				
			||||||
        if not os.fork():
 | 
					        if not os.fork():
 | 
				
			||||||
            subprocess.Popen(['nautilus',self.path]).wait()
 | 
					            subprocess.Popen(['nautilus',self.path]).wait()
 | 
				
			||||||
            sys.exit()
 | 
					            sys.exit()
 | 
				
			||||||
 | 
					    def gitk(self):
 | 
				
			||||||
 | 
					        if not os.fork():
 | 
				
			||||||
 | 
					            subprocess.Popen(['gitk',self.path]).wait()
 | 
				
			||||||
 | 
					            sys.exit()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self):
 | 
					    def __call__(self):
 | 
				
			||||||
        getattr(self,self.name,self._unknown)()
 | 
					        getattr(self,self.name,self._unknown)()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user