Module: core.alias — IPython 2.3.1 documentation

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# Module: `core.alias`

System command aliases.

Authors:

- Fernando Perez
- Brian Granger

## 4 Classes

class `IPython.core.alias.` `AliasError`

  Bases: `exceptions.Exception`

class `IPython.core.alias.` `InvalidAliasError`

  Bases: `IPython.core.alias.AliasError`

class `IPython.core.alias.` `Alias`(shell, name, cmd)

  Bases: `object`

  Callable object storing the details of one alias.

  Instances are registered as magic functions to allow use of aliases.

  `__init__`(shell, name, cmd)
  `validate`()

    Validate the alias, and return the number of arguments.

class `IPython.core.alias.` `AliasManager`(shell=None, **kwargs)

  Bases: `IPython.config.configurable.Configurable`

  `__init__`(shell=None, **kwargs)
  `define_alias`(name, cmd)

    Define a new alias after validating it.

    This will raise an `AliasError` if there are validation problems.

  `get_alias`(name)

    Return an alias, or None if no alias by that name exists.

  `is_alias`(name)

    Return whether or not a given name has been defined as an alias

  `retrieve_alias`(name)

    Retrieve the command to which an alias expands.

  `soft_define_alias`(name, cmd)

    Define an alias, but don’t raise on an AliasError.

## 1 Function

`IPython.core.alias.` `default_aliases`()

  Return list of shell aliases to auto-define.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »