##// END OF EJS Templates
bzr completer submitted by Stefan van der Walt
vivainio -
Show More
@@ -113,6 +113,42 b' def hg_completer(self,event):'
113 ip.set_hook('complete_command', hg_completer, str_key = 'hg')
113 ip.set_hook('complete_command', hg_completer, str_key = 'hg')
114
114
115
115
116 bzr_commands = """
117 add annotate bind branch break-lock bundle-revisions cat check
118 checkout commit conflicts deleted diff export gannotate gbranch
119 gcommit gdiff help ignore ignored info init init-repository inventory
120 log merge missing mkdir mv nick pull push reconcile register-branch
121 remerge remove renames resolve revert revno root serve sign-my-commits
122 status testament unbind uncommit unknowns update upgrade version
123 version-info visualise whoami
124 """
125
126 def bzr_completer(self,event):
127 """ Completer for bazaar commands """
128 cmd_param = event.line.split()
129 if event.line.endswith(' '):
130 cmd_param.append('')
131
132 if len(cmd_param) > 2:
133 cmd = cmd_param[1]
134 param = cmd_param[-1]
135 output_file = (param == '--output=')
136 if cmd == 'help':
137 return bzr_commands.split()
138 elif cmd in ['bundle-revisions','conflicts',
139 'deleted','nick','register-branch',
140 'serve','unbind','upgrade','version',
141 'whoami'] and not output_file:
142 return []
143 else:
144 # the rest are probably file names
145 return ip.IP.Completer.file_matches(event.symbol)
146
147 return bzr_commands.split()
148
149 ip.set_hook('complete_command', bzr_completer, str_key = 'bzr')
150
151
116 def runlistpy(self, event):
152 def runlistpy(self, event):
117 comps = shlex.split(event.line)
153 comps = shlex.split(event.line)
118 relpath = (len(comps) > 1 and comps[-1] or '')
154 relpath = (len(comps) > 1 and comps[-1] or '')
General Comments 0
You need to be logged in to leave comments. Login now