Change your default-shell to /bin/sh so that new windows started with a command will get /bin/sh and set default-command to tcsh so you get tcsh?
On Wed, May 06, 2015 at 03:11:43PM +0000, Kaushal wrote: > Thanks for the quick replies. But unfortunately, I have to use the tcsh > shell and I can put in my custom init stuff only in a ~/.alias which is > sourced by a company maintained ~/.cshrc. > In that ~/.cshrc, I already have: > # skip remaining setup if not an interactive shell > if ($?USER == 0 || $?prompt == 0) exit > # blah blah blah > if ( -e ~/.alias) then > * * * * source ~/.alias > endif > But it looks like that .alias is still getting loaded on doing > split-window. > > Also from man tcsh, I don't think that tcsh has anything like a "profile" > setup that bash has. > On Wed, May 6, 2015 at 11:03 AM Nicholas Marriott > <[1]nicholas.marri...@gmail.com> wrote: > > Most shells have a way to specify different init files for interactive > and noninteractive shells (such as setting ENV in .profile for ksh). > > Or if you're using a sh-like shell you could do something like this in > the profile: > > case "$-" in > *i*) > * * * * export SHELL_CONFIG_LOADED=1 > * * * * ;; > esac > > On Wed, May 06, 2015 at 02:47:20PM +0000, Kaushal 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. > > [2]http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > > > _______________________________________________ > > tmux-users mailing list > > [3]tmux-users@lists.sourceforge.net > > [4]https://lists.sourceforge.net/lists/listinfo/tmux-users > > References > > Visible links > 1. mailto:nicholas.marri...@gmail.com > 2. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > 3. mailto:tmux-users@lists.sourceforge.net > 4. 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