On 2013–05–14 Nicholas Marriott wrote:

> We have typically chosen - with a few exceptions - to try and make tmux
> create all windows with the same environment no matter how they are
> started. This means things are mostly consistent.

I don't have much knowledge about terminals internals, so bear with
me if this is a foolish idea. What about using the environment that
tmux was started in, instead of a clean one?

> The problem for you is that tmux is starting all your shells with the
> same termios and you are promptly changing it in some shell startup
> file. But when you run a command directly your shell, which I guess is
> probably bash, decides it is noninteractive and doesn't run your startup
> files.

That explains it. BTW: I use different shells on different systems,
mostly bash and zsh.

> You will have the same problem if you do, for example, xterm -e "vim".

Indeed. However, I never noticed that.

> The easiest solution is to run "stty -ixon; vim"

I'd call it “workaround”. I would have to prepend almost every
program call in all scripts with “stty”, that's not really elegant
and it's duplicated code.

> or you could look at BASH_ENV which is apparently also evaluated
> for noninteractive shells. You'll need to make sure BASH_ENV ends
> up in the tmux global environment (either it's in your environment
> at server start or you set it explicitly with tmux setenv -g).

This works, for ZSH ~/.zshenv can be used, see my other post.

Thanks for your comprehensive answer.

Marco


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to