Open JanzenJohn opened 1 year ago
Can you provide a debug log file or publish it in some pastebin
Run with debug:
exec 3>dayz-ctl.log
export BASH_XTRACEFD=3
bash -x dayz-ctl
Show me the dayz-ctl.log
and I'll try to help
yeah attached log here dayz-ctl.log
Okay, I see that this is a problem in the final loop before starting the game, and the script exit exactly in the options menu
This behavior is similar to not having a selected menu item, such as when pressing the ESC key
You can run this command and say the result
printf '%s\n' Play 'Add to favorites' 'Create Desktop Entry' | gum choose --no-limit; echo $?
For example, when I select Play
, it returns
Play
0
and when selecting multiple items Play
and Add to favorites
, it returns
Play
Add to favorites
0
Or this example where we also test the menu selection operation from the case loop
while read -r option; do case $option in
'Play') echo 'go go go';;
*) echo 'wtf';;
esac; done < <(printf '%s\n' Play None | gum choose --no-limit)
Must be
first
=go go go
second
=wtf
booth
=go go go wtf
ESC
=
And tell me what version of gum you use
gum --version
@JanzenJohn, this issue still relevant?
i think i have narrowed down the "error" using the
printf '%s\n' Play 'Add to favorites' 'Create Desktop Entry' | gum choose --no-limit; echo $?
example
i didn't know you needed to press spacebar, i navigated to the entry i wanted to select / use and hit enter
also sorry for the late reply, i somehow did not get any push messages until today
Could you maybe add a message / change the gum usage to not allow to "select nothing"
i didn't know you needed to press spacebar, i navigated to the entry i wanted to select / use and hit enter
@JanzenJohn, pressing Enter
on the currently selected element selects it. At least that's what happens to me.
Can you tell me which terminal emulator and OS are you using?
@WoozyMasta I'm using Arch-Linux-6.2.11 Gum version 0.10.0 (0f0f8e9)
Happens in any terminal I tried so far
(TTY via SSH, kgx (gnome), and xterm)
But are you sure using --no-limit it still works for you with only enter on the current element and not using any other arguments?
It turns out that in the version of gum 0.10 the multi-selection was broken https://github.com/charmbracelet/gum/issues/339
Let's see what the author of gum will answer, if it is recognized that this is a mistake (I believe that it is), we will wait for the update, if not, then I will think about how to make it work for different versions .
In the meantime, you can rollback to any version 0.7-0.9 or press the space bar each time to select an element
@JanzenJohn, thanks for helping me find the problem
cant launch directly into server on archlinux
using all-server > [SELECT SERVER] -> Play
the tool exits without doing anything, wether I'm ingame / outside of the game
there is no error message i get, am i misunderstanding the usage ?
Launching the game normaly via Launch Game works fine