##// END OF EJS Templates
stock completer for hg (mercurial)
vivainio -
Show More
@@ -91,6 +91,28 b' def svn_completer(self,event):'
91
91
92 ip.set_hook('complete_command', svn_completer, str_key = 'svn')
92 ip.set_hook('complete_command', svn_completer, str_key = 'svn')
93
93
94 hg_commands = """
95 add addremove annotate archive backout branch branches bundle cat
96 clone commit copy diff export grep heads help identify import incoming
97 init locate log manifest merge outgoing parents paths pull push
98 qapplied qclone qcommit qdelete qdiff qfold qguard qheader qimport
99 qinit qnew qnext qpop qprev qpush qrefresh qrename qrestore qsave
100 qselect qseries qtop qunapplied recover remove rename revert rollback
101 root serve showconfig status strip tag tags tip unbundle update verify
102 version
103 """
104
105 def hg_completer(self,event):
106 """ Completer for mercurial commands """
107 if len((event.line + 'placeholder').split()) > 2:
108 # the rest are probably file names
109 return ip.IP.Completer.file_matches(event.symbol)
110
111 return hg_commands.split()
112
113 ip.set_hook('complete_command', hg_completer, str_key = 'hg')
114
115
94 def runlistpy(self, event):
116 def runlistpy(self, event):
95 comps = shlex.split(event.line)
117 comps = shlex.split(event.line)
96 relpath = (len(comps) > 1 and comps[-1] or '')
118 relpath = (len(comps) > 1 and comps[-1] or '')
General Comments 0
You need to be logged in to leave comments. Login now