在Mac OSX上将大量代码粘贴到tmux

时间:2015-04-05 08:12:47

标签: macos tmux iterm2

假设我在tmux上打开一个python。 如果我粘贴了大量涉及一些延迟和打印语句的代码,tmux会向我返回一些随机垃圾。

例如,如果我复制以下代码(请手动重复中间部分)

import time
print("hello world");time.sleep(0.02)
print("hello world");time.sleep(0.02)
.
.  (please repeat it at least 50 times)
.
print("hello world");time.sleep(0.02)

并将其粘贴到tmux窗口。它没有返回我们的预期,而是一些原始输入的随机混合。

>>> print("hello world");time.sleep(0.02print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0.02print("hello world");time.sleep(0.0.02print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0.02print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0.02print("hello world");time.sleep(0.0.02print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0.02print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202print("hello world");time.sleep(0.0202

PS:

  1. 这不会发生在我的linux机器上,而只发生在我的Mac

  2. 当我在没有tmux的情况下打开python时也不会发生这种情况。

  3. 所以我的问题是:我有什么遗漏的吗?还是tmux的错误?

    tmux 1.9a,python 2.x和3.x,mac osx yosemite。

0 个答案:

没有答案