dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Running rcup results in strange terminal state requiring reset

Open entcheva opened this issue 9 years ago • 17 comments

Running env RCRC=$HOME/dotfiles/rcrc rcup after successful brew install rcm results in Vim error and leaves terminal in a strange state that requires a reset.

Error:

Vim: Warning: Input is not from a terminal
Vim: Caught deadly signal ABRT
Vim: Finished.

Formatting in terminal no longer has line breaks and requires reset to appear as intended.

entcheva avatar Mar 31 '17 22:03 entcheva

I get this same problem! Finally someone recreated it.

Can you let me know what terminal and Vim version you're using?

Also, are you using tmux?

geoffharcourt avatar Apr 03 '17 13:04 geoffharcourt

I get this as well. screen shot 2017-04-03 at 9 47 13 am

iTerm2, Build 3.1.beta.2 tmux 2.3 VIM 8.0.535 NeoVim v0.2.0-1162-gbc6d868d

shknbk avatar Apr 03 '17 13:04 shknbk

In https://github.com/thoughtbot/dotfiles/pull/510 I attempted to resolve this problem, but it broke rcup for several users who hadn't been experiencing my issue, so I reverted it. Now that we've got several people who experience the problem, maybe we can nail down what the issue is. I suspect that tmux is the issue since this doesn't appear to be a vim vs. Neovim issue (the post-up hook executes vim, not Neovim in any event).

geoffharcourt avatar Apr 03 '17 14:04 geoffharcourt

Random data point: I've never seen this issue and I don't use tmux.

mikegee avatar Apr 03 '17 14:04 mikegee

@geoffharcourt I just tried running rcup outside of tmux and I still have the same issue. However #510 fixes it for me (in and out of tmux), so I'm going to use that for now. Thanks!

shknbk avatar Apr 03 '17 14:04 shknbk

I've been getting this for a while now too (Vim: Warning: Input is not from a terminal). If it's helpful:

  • iTerm 3.0.15
  • tmux 2.3
  • Vim 8.0.0531

I also use Neovim (0.1.7), though as discussed it seems like that shouldn't matter.

rjdellecese avatar Apr 03 '17 14:04 rjdellecese

@devinrm if you start a terminal with no tmux ever having been run in the terminal do you have the issue?

geoffharcourt avatar Apr 03 '17 14:04 geoffharcourt

@geoffharcourt Yep. I just downloaded iTerm 3.0.15 ran it from disk without starting tmux and got the same message (Vim: Warning: Input is not from a terminal)

shknbk avatar Apr 03 '17 14:04 shknbk

I don't know if this is helpful but if you change it so that the post up hook executes from neovim, it works fine: nvim -u "$HOME"/.vimrc.bundles +PlugInstall +PlugClean! +qa

shknbk avatar Apr 03 '17 15:04 shknbk

Hi @geoffharcourt, I’m using:

  • vim 7.3
  • zsh 5.0.2

entcheva avatar Apr 04 '17 14:04 entcheva

Same issue. This causes dotfiles not create symlink properly.

  • vim: 8.0
  • iTerm: 3.0.14
  • zsh: 5.0.8

pmkhoa avatar Apr 14 '17 22:04 pmkhoa

How about calling reset after the vim command runs?

mike-burns avatar Apr 21 '17 02:04 mike-burns

Yup, after reset formatting appears as expected.

entcheva avatar Apr 21 '17 21:04 entcheva

@mike-burns you are a hero.

geoffharcourt avatar Apr 24 '17 21:04 geoffharcourt

With a reset inserted after the vim line in post-up, I get this output before getting a shell prompt again:

Erase set to delete.
Kill set to control-U (^U).
Interrupt set to control-C (^C).

I assume this is harmless (everything appears to work fine), but wasn't sure if we should worry about it. Can't find anything notable in web searches about it.

cc: @mike-burns

geoffharcourt avatar Apr 28 '17 19:04 geoffharcourt

reset(1) says:

       -Q   Do not display any values for the erase, interrupt and  line  kill
            characters.  Normally tset displays the values for control charac‐
            ters which differ from the system's default values.

So, try passing -Q.

mike-burns avatar Apr 28 '17 19:04 mike-burns

Thank you @entcheva @devinrm @mike-burns @pmkhoa @mikegee @rjdellecese for your help investigating and fixing!

geoffharcourt avatar Apr 28 '17 20:04 geoffharcourt