Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add newline if missing to end of script magic cell #6102

Merged
merged 1 commit into from Jul 9, 2014

Conversation

etgalloway
Copy link
Contributor

The script magic %%cmd fails in IPython notebook if trailing newlines are omitted.

In IPython console, %%cmd behaves correctly:

In [1]: %%cmd
   ...: echo foo
   ...:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Eric>echo foo
foo

C:\Users\Eric>

In IPython notebook, %%cmd fails if a cell is not terminated with two blank lines:

In [1]: %%cmd
   ...: echo foo
   ...:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Eric\Documents\Code\notebooks>More? 

@minrk minrk added this to the 2.2 milestone Jul 9, 2014
minrk added a commit that referenced this pull request Jul 9, 2014
Add newline if missing to end of script magic cell
@minrk minrk merged commit 7af694e into ipython:master Jul 9, 2014
@minrk
Copy link
Member

minrk commented Jul 9, 2014

Thanks!

minrk added a commit that referenced this pull request Jul 24, 2014
The script magic %%cmd fails in IPython notebook if trailing newlines are omitted.

In IPython console, %%cmd behaves correctly:
```
In [1]: %%cmd
...
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Add newline if missing to end of script magic cell
@etgalloway etgalloway deleted the script-magic-cmd branch February 24, 2016 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants