Show More
@@ -169,6 +169,10 b' class Alias(object):' | |||||
169 | if cmd.find('%l') >= 0: |
|
169 | if cmd.find('%l') >= 0: | |
170 | cmd = cmd.replace('%l', rest) |
|
170 | cmd = cmd.replace('%l', rest) | |
171 | rest = '' |
|
171 | rest = '' | |
|
172 | ||||
|
173 | if cmd.find('%%s') >= 1: | |||
|
174 | cmd = cmd.replace('%%s', '%s') | |||
|
175 | ||||
172 | if nargs==0: |
|
176 | if nargs==0: | |
173 | # Simple, argument-less aliases |
|
177 | # Simple, argument-less aliases | |
174 | cmd = '%s %s' % (cmd, rest) |
|
178 | cmd = '%s %s' % (cmd, rest) |
@@ -42,9 +42,9 b' def test_alias_args_error():' | |||||
42 |
|
42 | |||
43 | def test_alias_args_commented(): |
|
43 | def test_alias_args_commented(): | |
44 | """Check that alias correctly ignores 'commented out' args""" |
|
44 | """Check that alias correctly ignores 'commented out' args""" | |
45 |
_ip. |
|
45 | _ip.magic('alias commetarg echo this is %%s a "commented out" arg') | |
46 |
|
46 | |||
47 | with capture_output as cap: |
|
47 | with capture_output() as cap: | |
48 | _ip.run_cell('commetarg') |
|
48 | _ip.run_cell('commetarg') | |
49 |
|
49 | |||
50 | nt.assert_equal(cap.stdout, 'this is %s a "commented out" arg') No newline at end of file |
|
50 | nt.assert_equal(cap.stdout, 'this is %s a "commented out" arg') |
General Comments 0
You need to be logged in to leave comments.
Login now