New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore bash command in pane #65

Closed
Azrael3000 opened this Issue Mar 27, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@Azrael3000

Azrael3000 commented Mar 27, 2014

At the moment empty panes are saved as - bash which starts bash on top of bash which is really unnecessary I think. So it might be good to ignore the standard shell command when saving.

@tony

This comment has been minimized.

Member

tony commented Mar 28, 2014

I do have some tests to make sure bash/zsh etc don't get clumped in the freezer, but it may require more tests. I will look closer into this.

@tony tony added this to the Freezer milestone Mar 28, 2014

@sublimino

This comment has been minimized.

sublimino commented Jun 15, 2016

@Azrael3000 setting default-shell and default-command suppresses this behaviour:

- shell_command:
  - tmux set-option -g default-shell /bin/bash
  - tmux set-option -g default-command /bin/bash
  - <some command>
@tony

This comment has been minimized.

Member

tony commented Jun 15, 2016

@sublimino @Azrael3000

Does this work?

session_name: global-options
start_directory: '~'
options:
  default-shell: ${SHELL}
  default-command: ${SHELL}
windows:
- window_name: my window name
  layout: main-horizontal
  panes:
  - shell_command:
    - top
  -
  -

As of yet, I don't see an example to set global options, if it doesn't work, we'll add the functionality/tests and an example.

@sublimino

This comment has been minimized.

sublimino commented Jun 15, 2016

@tony I'm afraid not, it still results in a new pane spawning bash-in-bash

@tony tony added the enhancement label Jun 15, 2016

@tony tony modified the milestones: Milestone 1.1, Freezer, Milestone 1.2 Jun 15, 2016

tony added a commit that referenced this issue Jun 16, 2016

Add ability to specify session/global options
Ability to specify ``options`` and ``global_options`` via
configuration. Also you can specify environment variables via that.

Add tests for it.

Update libtmux to v0.5

See also: #65

tony added a commit that referenced this issue Jun 16, 2016

@tony

This comment has been minimized.

Member

tony commented Jun 16, 2016

@sublimino @Azrael3000 pip install -U tmuxp to 1.2.0... does it work now?

@tony

This comment has been minimized.

Member

tony commented Jun 16, 2016

You can also set it as a global (server-wide, all sessions) option:

session_name: global-options
start_directory: '~'
global_options:
  default-shell: ${SHELL}
  default-command: ${SHELL}
windows:
- window_name: my window name
  layout: main-horizontal
  panes:
  - shell_command:
    - top
  -
  -
@sublimino

This comment has been minimized.

sublimino commented Jun 16, 2016

@tony loving the responsiveness on this, thanks!

with 1.2.0 both options and global_options have the desired effect 😀

FWIW only default-command is required to suppress the duplicate-shell behaviour in this ticket.

@stale

This comment has been minimized.

stale bot commented Nov 11, 2017

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

This bot is used to handle issues where the issue hasn't been discussed or
has gone out of date. If an issue isn't resolved and handled in a certain
period of time, it may be closed. If you would like your issue re-opened,
please create a fresh issue with the latest, up to date information and
mention this issue in it.

@stale stale bot added the stale label Nov 11, 2017

@stale stale bot closed this Nov 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment