I tried that but as I mentioned in the parallel thread, tcsh was still load
first as my default-shell was tcsh. Changing default-shell to /bin/sh and
default-command to tcsh fixed everything.
I now just need to make sure that I pass in a bash/sh compatiable command
instead of a tcsh/csh command.
On Wed, May 6, 2015 at 10:55 AM Chas. Owens <chas.ow...@gmail.com> wrote:
> It sounds like your heavy weight initializing is being done in .bashrc as
> opposed to .bash_profile or .profile. The .bashrc config file is intended
> to barely bootstrap your environment and .bash_profile (or .profile) is
> intended to make an interactive shell usable. One option would be to use a
> different shell like sh to run your commands: sh -c "ls | percol
> --initial-index `tmux ls | awk '/attached.$/ {print NR-1}'` | cut -d':' -f
> 1 | xargs tmux switch-client -t" another would be to specify a different
> .bashrc: bash --rcfile ".bashrc_light" -c "tmux ls | blah".
>
> On Wed, May 6, 2015 at 10:49 AM Kaushal <kaushal.m...@gmail.com> wrote:
>
>> Hi,
>>
>> I use the tmux split-window function only temporarily at times to do some
>> quick selections from a list using percol.
>>
>> Examples:
>>
>> # switch to another session by name
>> bind S split-window "tmux ls | percol --initial-index `tmux ls | awk
>> '/attached.$/ {print NR-1}'` | cut -d':' -f 1 | xargs tmux switch-client -t"
>> # switch to ANY window in ANY session by name
>>
>> # switch to ANY window in ANY session by name
>> bind s split-window "tmux ls | cut -d: -f1 | xargs -I SESSION tmux lsw
>> -F 'SESSION:#{window_name}' -t SESSION | percol --initial-index `tmux ls |
>> cut -d: -f1 | xargs -I SESSION tmux lsw -F
>> '___#{session_attached}#{window_active}___' -t SESSION | awk '/___11___/
>> {print NR-1}'` | xargs tmux switch-client -t"
>>
>> These work except that when creating a new window, it also load my shell
>> init script.
>>
>> For a new terminal, window, my shell init always loads a bunch of
>> environment manipulation that I need to run certain company programs when I
>> am actually working in a terminal. I don't need those in the above
>> temporary split-window cases.
>>
>> I can also skip the time consuming environment setup if I can set an env
>> var SHELL_CONFIG_LOADED before calling split-window.
>>
>> So the questions I have are:
>>
>> - How can I make split-window not load my default shell init (*rc) script?
>> - Alternatively, how can I set an env var SHELL_CONFIG_LOADED before my
>> shell init gets loaded on doing split-window?
>>
>> Thanks.
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> tmux-users mailing list
>> tmux-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tmux-users
>>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users