Giter Club home page Giter Club logo

Comments (5)

greymd avatar greymd commented on June 10, 2024
bash-3.2# tmux -V
tmux 3.2
bash-3.2# bash --version
GNU bash, version 3.2.57(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2007 Free Software Foundation, Inc.
bash-3.2# bash test_generator.sh 64  > case.sh
bash-3.2# bash case.sh
Testing for bash 3.2.57(1)-release
tmux path: /usr/bin/tmux
            tmux 3.2

[detached (from session 0)]
>>>>>>>>>>
TMUX_XPANES_EXEC ... 'tmux -2'
test_ss_option_panes_not_found

 $ TMUX(./xpanes -sse exit ; echo $? > /tmp/shunit.NEogeB/tmp/exit_status)

[detached (from session 0)]
[detached (from session 0)]
ASSERT:expected:<31> but was:<0>
<<<<<<<<<<

in oneTimeTearDown

Ran 1 test.

FAILED (failures=1)
<<<<<<<<<<

in oneTimeTearDown
bash-3.2#

=> Reproduced on local

from tmux-xpanes.

greymd avatar greymd commented on June 10, 2024
7be6cb8f5050:/tmp/tmux-xpanes# ./bin/xpanes -sse exit
no such window: 657869742d3630320a
can't find window: 657869742d3630320a
7be6cb8f5050:/tmp/tmux-xpanes# echo $?
0

=> reproduced (exit status should be 31).

7be6cb8f5050:/tmp/tmux-xpanes# ./bin/xpanes --debug -sse exit
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:Window: { Height: 80, Width: 181 }
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:Cell: { Height: 80, Width: 181 }
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:# Of Panes: 1
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:         | Row[0] --...--> Row[MAX]
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:    -----+------------------------...
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:    Col[]| 1
xpanes:Debug: [2023-01-31_22:39:08]:xpns_check_cell_size:    -----+------------------------...
xpanes:Debug: [2023-01-31_22:39:08]:xpns_execution:Options: '--debug' '-s' '-s' '-e' '-c' '{}'
xpanes:Debug: [2023-01-31_22:39:08]:xpns_execution:Arguments: 'exit'
xpanes:Debug: [2023-01-31_22:39:08]:xpns_wait_func:mkfifo /root/.cache/xpanes/__xpns_sync_657869742d313339360a-0-1396
xpanes:Debug: [2023-01-31_22:39:08]:xpns_wait_func:grep -q 1 '/root/.cache/xpanes/__xpns_sync_657869742d313339360a-0-1396'
xpanes:Debug: [2023-01-31_22:39:08]:xpns_execution:xpns_is_window_alive:1: After window separation
xpanes:Debug: [2023-01-31_22:39:08]:xpns_execution:xpns_is_window_alive:2: After logging
xpanes:Debug: [2023-01-31_22:39:08]:xpns_execution:xpns_is_window_alive:3: After setting title
xpanes:Debug: [2023-01-31_22:39:08]:xpns_notify:Notify to /root/.cache/xpanes/__xpns_sync_657869742d313339360a-0-1396
xpanes:Debug: [2023-01-31_22:39:08]:xpns_execution:xpns_is_window_alive:4: After sending commands
no such window: 657869742d313339360a
can't find window: 657869742d313339360a
xpanes:Debug: [2023-01-31_22:39:08]:xpns_clean_session:file = /root/.cache/xpanes/socket.*
xpanes:Debug: [2023-01-31_22:39:08]:xpns_clean_session:socket(/root/.cache/xpanes/socket.*) is not running. Remove it
7be6cb8f5050:/tmp/tmux-xpanes# echo $?
0
# bash -x ./bin/xpanes -sse exit &> issue_175
# less issue_175
︙
+ xpns_msg_debug 'xpns_is_window_alive:4: After sending commands'
+ [[ 0 -eq 1 ]]
+ xpns_is_window_alive 657869742d313535300a 1 off
+ local _window_name=657869742d313535300a
+ shift
+ local _speedy_await_flag=1
+ shift
+ local _def_allow_rename=off
+ shift
+ tmux-3.2 display-message -t 657869742d313535300a -p
+ [[ 0 -eq 1 ]]
+ [[ 0 -eq 1 ]]
+ [[ 1 -eq 1 ]]
+ [[ 0 -eq 0 ]]
+ tmux-3.2 set-window-option -t 657869742d313535300a synchronize-panes on
no such window: 657869742d313535300a
︙

from tmux-xpanes.

greymd avatar greymd commented on June 10, 2024

Basic step to repro

Execute this command in the tmux session.

w=$(tmux new-window -n win -F '#{window_id}' -P -d exit); tmux display-message -t "$w"; echo $?

Result

tmux 3.0a => expected

# w=$(tmux-3.0a new-window -n win -F '#{window_id}' -P -d exit); tmux-3.0a display-message -t "$w"; echo $?
can't find window: @1
1

tmux 3.1 => expected

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.1 new-window -n win -F '#{window_id}' -P -d exit); tmux-3.1 display-message -t "$w"; echo $?
can't find window: @2
1

tmux-3.1b => expected

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.1b new-window -n win -F '#{window_id}' -P -d exit); tmux-3.1b display-message -t "$w"; echo $?
can't find window: @1
1

tmux-3.1c => expected

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.1c new-window -n win -F '#{window_id}' -P -d exit); tmux-3.1c display-message -t "$w"; echo $?
can't find window: @2
1

tmux-3.2 => UNEXPECTED

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.2 new-window -n win -F '#{window_id}' -P -d exit); tmux-3.2 display-message -t "$w"; echo $?
0

tmux-3.2a => UNEXPECTED

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.2a new-window -n win -F '#{window_id}' -P -d exit); tmux-3.2a display-message -t "$w"; echo $?
0

tmux-3.3 => UNEXPECTED

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.3 new-window -n win -F '#{window_id}' -P -d exit); tmux-3.3 display-message -t "$w"; echo $?
0

tmux-3.3a => UNEXPECTED

7be6cb8f5050:/tmp/tmux-xpanes# w=$(tmux-3.3a new-window -n win -F '#{window_id}' -P -d exit); tmux-3.3a display-message -t "$w"; echo $?
0

From tmux 3.2, display-message is not the supported way to check if the window exists.

from tmux-xpanes.

greymd avatar greymd commented on June 10, 2024

Instead of changing the exit status, display-message returns empty value.

7be6cb8f5050:/tmp/tmux-xpanes# tmux display-message -t '@0' -p
[0] 0:ash, current pane 0 - (23:10 31-Jan-23)
7be6cb8f5050:/tmp/tmux-xpanes# tmux display-message -t '@1' -p
[] :, current pane  - (23:10 31-Jan-23)

from tmux-xpanes.

greymd avatar greymd commented on June 10, 2024

Fixed in d17ab7b
Closed

from tmux-xpanes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.