Permalink
Browse files

Merge PR #591

closes gh-591
  • Loading branch information...
2 parents 657a41b + 1e619bd commit 7deb8e8ea8d90f3ffa2558721f8fd680f360b86a @minrk minrk committed Jul 18, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 IPython/core/magic.py
View
@@ -1591,7 +1591,11 @@ def magic_run(self, parameter_s ='',runner=None,
# Make sure that the running script gets a proper sys.argv as if it
# were run from a system shell.
save_argv = sys.argv # save it for later restoring
- sys.argv = [filename]+ arg_lst[1:] # put in the proper filename
+
+ # simulate shell expansion on arguments, at least tilde expansion
+ args = [ os.path.expanduser(a) for a in arg_lst[1:] ]
+
+ sys.argv = [filename]+ args # put in the proper filename
if opts.has_key('i'):
# Run in user's interactive namespace

0 comments on commit 7deb8e8

Please sign in to comment.