eshell在远程编辑时启动python IDLE,而不是运行脚本

eshell在远程编辑时启动python IDLE,而不是运行脚本,python,emacs,tramp,eshell,Python,Emacs,Tramp,Eshell,在Emacs 24.3.1中,我在eshell中通过Tramp/ssh进行编辑时得到以下信息: /<remotepath> $ bash /<remotepath> $ python test.py hello world! /<remotepath> $ exit exit /<remotepath> $ python test.py Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) [GCC 4

在Emacs 24.3.1中,我在eshell中通过Tramp/ssh进行编辑时得到以下信息:

/<remotepath> $ bash
/<remotepath> $ python test.py
hello world!
/<remotepath> $ exit
exit
/<remotepath> $ python test.py
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Bash是4.1.2版。有人对这种行为有什么解释吗

我不知道
eshell
,但我猜您在创建别名时忘了传递位置参数:

#                   don't forget the quotes  
#                ▼                            ▼
~ $ alias python '/path/to/alternate/python $*'
#                                           ▲▲
#                don't forget positional parameters

请参见

可能
python
命令有别名?是的!我将其别名为系统上安装的另一个python版本。是否有一种简单而正确的方法将别名转换为python的其他版本?另一种方法是每次键入绝对路径。谢谢!
#                   don't forget the quotes  
#                ▼                            ▼
~ $ alias python '/path/to/alternate/python $*'
#                                           ▲▲
#                don't forget positional parameters