Skip to content

Commands in shell_command do not run as expected #481

Open
@ksalman

Description

@ksalman

Step 1: Provide a summary of your problem

  • For general technical questions, problems or feature requests related to the code in this repository file an issue.

Step 2: Provide tmuxp details

  • Python version
    2.7.6

  • system PATH
    /u/ksalman/.pyenv/plugins/pyenv-virtualenv/shims:/u/ksalman/.pyenv/shims:/u/ksalman/.pyenv/bin:/u/ksalman/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/u/qa/tools:/usr/X11R6/bin:/u/qa/lab/scripts:/u/ksalman/scripts

  • tmux version
    tmux 2.7-rc

  • tmuxp version
    tmuxp 1.5.1

  • tmux path
    /usr/local/bin/tmux

  • tmuxp path,
    /u/ksalman/.pyenv/shims/tmuxp

  • libtmux version
    libtmux==0.8.1

  • shell
    GNU bash, version 4.3.30(1)-release (i586-pc-linux-gnu)

  • output of tmux list-sessions, tmux list-windows, tmux list-panes
    [ksalman@dalaran:~] $ tmux list-sessions
    0: 18 windows (created Thu Jun 7 14:41:45 2018) [105x53] (attached)
    smoot: 7 windows (created Tue Feb 26 10:14:18 2019) [129x42]

[ksalman@dalaran:~] $ tmux list-windows
0: bash- (2 panes) [105x53] [layout eb9a,105x53,0,0[105x26,0,0,0,105x26,0,27,937]] @0
1: openstack (2 panes) [105x53] [layout e033,105x53,0,0[105x21,0,0,2,105x31,0,22,3]] @1
2: ssh (2 panes) [105x53] [layout 7b0d,105x53,0,0{23x53,0,0,194,81x53,24,0,195}] @106
3: aptly (1 panes) [105x53] [layout 6f0b,105x53,0,0,232] @120
4: solaris-oak-vcs2960 (1 panes) [105x53] [layout 6f0e,105x53,0,0,273] @134
5: jiracurl (1 panes) [105x53] [layout 6f0f,105x53,0,0,445] @188
6: bash (3 panes) [105x53] [layout bfd2,105x53,0,0[105x21,0,0,448,105x31,0,22{28x31,0,22,459,76x31,29,22,460}]] @190
7: bash (2 panes) [105x53] [layout f507,105x53,0,0[105x21,0,0,487,105x31,0,22,488]] @203
8: bash (1 panes) [105x53] [layout 2f0d,105x53,0,0,514] @218
9: bash (3 panes) [105x53] [layout 1c1b,105x53,0,0{31x53,0,0,517,73x53,32,0[73x21,32,0,550,73x31,32,22,552]}] @219
10: emeril (3 panes) [105x53] [layout 6ecd,105x53,0,0[105x21,0,0,766,105x31,0,22{45x31,0,22,749,59x31,46,22,833}]] @279
11: bash (2 panes) [105x53] [layout a1a5,105x53,0,0{45x53,0,0,838,59x53,46,0,839}] @308
12: bash (1 panes) [105x53] [layout ef0b,105x53,0,0,850] @311
13: bash (1 panes) [105x53] [layout ef0d,105x53,0,0,852] @312
14: (1 panes) [105x53] [layout ef13,105x53,0,0,858] @314
15: bash (1 panes) [105x53] [layout d7b7,105x53,0,0,1023] @396
16: bash (1 panes) [105x53] [layout d7be,105x53,0,0,1049] @405
17: vi* (2 panes) [105x53] [layout 1fb2,105x53,0,0[105x26,0,0,1089,105x26,0,27,1109]] @423 (active)

[ksalman@dalaran:~] $ tmux list-panes
0: [105x26] [history 0/50000, 0 bytes] %1089
1: [105x26] [history 0/50000, 0 bytes] %1109 (active)

  • output of tmux show-options -g, tmux show-window-options -g
    [ksalman@dalaran:~] $ tmux show-options -g
    activity-action other
    assume-paste-time 1
    base-index 0
    bell-action any
    default-command ""
    default-shell "/bin/bash"
    destroy-unattached off
    detach-on-destroy on
    display-panes-active-colour red
    display-panes-colour blue
    display-panes-time 1000
    display-time 750
    history-limit 50000
    key-table "root"
    lock-after-time 0
    lock-command "lock -np"
    message-command-style fg=yellow,bg=black
    message-style fg=black,bg=yellow
    mouse off
    prefix C-a
    prefix2 None
    renumber-windows on
    repeat-time 500
    set-titles off
    set-titles-string "#S:#I:#W - "#T" #{session_alerts}"
    silence-action other
    status on
    status-interval 15
    status-justify left
    status-keys vi
    status-left "[#S] "
    status-left-length 10
    status-left-style default
    status-position bottom
    status-right " "#{=21:pane_title}" %H:%M %d-%b-%y"
    status-right-length 40
    status-right-style default
    status-style fg=black,bg=green
    update-environment[0] "DISPLAY"
    update-environment[1] "SSH_ASKPASS"
    update-environment[2] "SSH_AUTH_SOCK"
    update-environment[3] "SSH_AGENT_PID"
    update-environment[4] "SSH_CONNECTION"
    update-environment[5] "WINDOWID"
    update-environment[6] "XAUTHORITY"
    visual-activity off
    visual-bell off
    visual-silence off
    word-separators " -_@"

[ksalman@dalaran:~] $ tmux show-window-options -g
aggressive-resize off
allow-rename off
alternate-screen on
automatic-rename on
automatic-rename-format "#{?pane_in_mode,[tmux],#{pane_current_command}}#{?pane_dead,[dead],}"
clock-mode-colour blue
clock-mode-style 24
force-height 0
force-width 0
main-pane-height 24
main-pane-width 80
mode-keys vi
mode-style fg=black,bg=yellow
monitor-activity off
monitor-bell on
monitor-silence 0
other-pane-height 0
other-pane-width 0
pane-active-border-style fg=green
pane-base-index 0
pane-border-format "#{?pane_active,#[reverse],}#{pane_index}#[default] "#{pane_title}""
pane-border-status off
pane-border-style default
remain-on-exit off
synchronize-panes off
window-active-style default
window-status-activity-style reverse
window-status-bell-style reverse
window-status-current-format "#I:#W#{?window_flags,#{window_flags}, }"
window-status-current-style bg=blue
window-status-format "#I:#W#{?window_flags,#{window_flags}, }"
window-status-last-style default
window-status-separator " "
window-status-style default
window-style default
wrap-search on
xterm-keys on

  • output of tmuxp freeze <SESSION_NAME>

Step 3: Describe your environment

  • Architecture: i686
  • OS version: Debian 8.0

Step 4: Describe the problem:

Steps to reproduce:

Observed Results:

  • What happened? This could be a description, log output, etc.
    Commands in shell_command appear to be running before the shell is initialized. When I load the config pasted below, I get this in the pane created:
 cd /var/log
 echo foo
[ksalman@dalaran:~] $  cd /var/ echo

Expected Results:

  • What did you expect to happen?
    I would expect commands to run and the output would look like this:
[ksalman@dalaran:~] $ cd /var/log
[ksalman@dalaran:/var/log] $ echo foo
foo

Relevant Code:

session_name: test
windows:
- window_name: test
  panes:
     - shell_command:
         - cd /var/log
         - echo foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions