diff --git a/IPython/core/alias.py b/IPython/core/alias.py index e1a6242..3d79908 100644 --- a/IPython/core/alias.py +++ b/IPython/core/alias.py @@ -151,8 +151,8 @@ class Alias(object): raise InvalidAliasError("An alias command must be a string, " "got: %r" % self.cmd) - nargs = self.cmd.count('%s') - + nargs = self.cmd.count('%s') - self.cmd.count('%%s') + if (nargs > 0) and (self.cmd.find('%l') >= 0): raise InvalidAliasError('The %s and %l specifiers are mutually ' 'exclusive in alias definitions.')