From a82dc7efca3f522119c680312803bdfe4d3cdaca 2012-06-02 02:04:19 From: Fernando Perez Date: 2012-06-02 02:04:19 Subject: [PATCH] Merge pull request #1830 from wright/alphabetizeMagics Change lsmagic to list magics in alphabetical order. --- diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 5fb2ba2..2784ce1 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -46,10 +46,10 @@ class BasicMagics(Magics): mman = self.shell.magics_manager magics = mman.lsmagic() out = ['Available line magics:', - mesc + (' '+mesc).join(magics['line']), + mesc + (' '+mesc).join(sorted(magics['line'])), '', 'Available cell magics:', - cesc + (' '+cesc).join(magics['cell']), + cesc + (' '+cesc).join(sorted(magics['cell'])), '', mman.auto_status()] return '\n'.join(out)