diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index df011e9..fe3b6bf 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2055,11 +2055,14 @@ class InteractiveShell(SingletonConfigurable): # Register Magic Aliases mman = self.magics_manager + # FIXME: magic aliases should be defined by the Magics classes + # or in MagicsManager, not here mman.register_alias('ed', 'edit') mman.register_alias('hist', 'history') mman.register_alias('rep', 'recall') mman.register_alias('SVG', 'svg', 'cell') mman.register_alias('HTML', 'html', 'cell') + mman.register_alias('file', 'writefile', 'cell') # FIXME: Move the color initialization to the DisplayHook, which # should be split into a prompt manager and displayhook. We probably diff --git a/IPython/core/magics/osm.py b/IPython/core/magics/osm.py index 146b5e9..71f0035 100644 --- a/IPython/core/magics/osm.py +++ b/IPython/core/magics/osm.py @@ -707,12 +707,12 @@ class OSMagics(Magics): help='file to write' ) @cell_magic - def file(self, line, cell): + def writefile(self, line, cell): """Write the contents of the cell to a file. The file will be overwritten unless the -a (--append) flag is specified. """ - args = magic_arguments.parse_argstring(self.file, line) + args = magic_arguments.parse_argstring(self.writefile, line) filename = os.path.expanduser(unquote_filename(args.filename)) if os.path.exists(filename):