Show the command you are running including the select-pane bit please. Adding -t to run-shell is not a bad idea.
On Fri, Oct 12, 2012 at 08:53:32PM -0400, Alexander Tsepkov wrote: > I often have to run a command in multiple panes, for example when editing > my .bashrc settings, or other change I want applied to all panes. I found > a neat script for doing this: [1]https://gist.github.com/2773454 > > The script relies on send-keys and seems to work well in many cases. > Unfortunately, in some panes this causes a bug (it's inconsistent, so I'm > still unsure why it's happening), where the pane tries to execute "ull" > command instead, which doesn't exist, causing bash to complain. My guess > is it's the last 3 characters of the 'tmux send-keys "$command && fg > 2>/dev/null" C-m' line from the script, which for some reason are getting > cut off and sent individually (could it be that the string is too long for > the tmux send-keys buffer?). To remedy this, I figured I'd use run-shell > instead. > > In the past, I've used run-shell command instead, which has several > advantages over send-keys (it doesn't need to suspend the process, and it > doesn't need to send command as a set of keys, making it work much > faster). Unfortunately, in this case, that command causes all output to > happen in the original pane that ran this script, despite the 'tmux > select-pane -t $pane' command that should be switching the target pane. Is > this a bug? Am I doing something wrong? I would have thought if I select a > different pane, run-shell command is now tied to that new pane rather than > the original pane the process is running from. If not, is there a way to > bypass that? I don't mind using send-keys if I can figure out why the > 'ull' bug is occuring and fix that, but I would much rather prefer if I > could modify this script to use run-shell, this way not only I don't have > to deal wtih that bug, but I don't have to suspend the process, which > introduces other problems as well (for example my vim, which is tied to my > version control system, sometimes asks me if I'm sure I want to edit the > file after I resume it from suspend). If this is a limitation of > run-shell, do you guys think it would be a good idea to have 'run-shell -t > <pane> <command>' option? If so, I could look into adding it myself. > > References > > Visible links > 1. https://gist.github.com/2773454 > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users