[IPython-User] Ipython and bash_profile

Thomas Kluyver takowl@gmail....
Wed Nov 9 08:20:55 CST 2011


On 9 November 2011 13:48, Rafael Barbosa <rrbarbosa@gmail.com> wrote:

> After months (maybe years?) of using ipython, I just realized that it does
> not "see" the alias I define in my .bash_profile. For instance, I made an
> alias to rm="rm -i", but executing: '!rm a-file' inside ipython does not
> ask for confirmation. Is this expected? Is there a way around it?
>

If you're in the terminal, we use Python's os.system call, which I believe
will call the default platform shell (what you get if you run 'sh' -
typically not bash). In the Qt console (or other frontends), the call
doesn't go through a shell at all.

You might want to look at how to define aliases in IPython:

http://ipython.org/ipython-doc/stable/interactive/reference.html#system-command-aliases

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20111109/769d36ae/attachment.html 


More information about the IPython-User mailing list