Show More
@@ -253,7 +253,11 b' def magic_run_completer(self, event):' | |||
|
253 | 253 | """Complete files that end in .py or .ipy or .ipynb for the %run command. |
|
254 | 254 | """ |
|
255 | 255 | comps = arg_split(event.line, strict=False) |
|
256 | relpath = (len(comps) > 1 and comps[-1] or '').strip("'\"") | |
|
256 | # relpath should be the current token that we need to complete. | |
|
257 | if (len(comps) > 1) and (not event.line.endswith(' ')): | |
|
258 | relpath = comps[-1].strip("'\"") | |
|
259 | else: | |
|
260 | relpath = '' | |
|
257 | 261 | |
|
258 | 262 | #print("\nev=", event) # dbg |
|
259 | 263 | #print("rp=", relpath) # dbg |
@@ -270,7 +274,7 b' def magic_run_completer(self, event):' | |||
|
270 | 274 | # be arguments to the input script. |
|
271 | 275 | |
|
272 | 276 | if any(magic_run_re.match(c) for c in comps): |
|
273 | pys = [f.replace('\\','/') for f in lglob('*')] | |
|
277 | pys = [f.replace('\\','/') for f in lglob(relpath+'*')] | |
|
274 | 278 | else: |
|
275 | 279 | pys = [f.replace('\\','/') |
|
276 | 280 | for f in lglob(relpath+'*.py') + lglob(relpath+'*.ipy') + |
General Comments 0
You need to be logged in to leave comments.
Login now