list row action command don't create row)

117 views
Skip to first unread message

Владимир Лагутин

unread,
Dec 21, 2020, 2:50:22 PM12/21/20
to yad-common

Hello there. I have a problem. I try to add row in yad list, but --row-action command can't add string in all columns, but only in first.I have tried to use different separators ("|","\n","\t"," " and other), but it did not work. Also i have tried use cycle for:  "for i in 1 2 3 4; do echo "$i"; done" instead of "echo 1 2 3 4". By the way "bash -c "echo 1 2 3 4" didn’t work and gave errors. I used just "echo 1 2 3 4".

Code:
yad --list --center --width=1100 --height=450 --column=URL:TEXT \
                                                                             --column=Username:TEXT\
                                                                             --column=Password:TEXT\
                                                                             --column=Notes:TEXT\
                                                                             --editable\
                                                                             --hscroll-policy=always\
                                                                             --row-action="echo 1 2 3 4"\
                                                                             1 2 3 4 q w e r 6 7 8 9 t y u i

If anyone knows what to do in such a situation, please answer. I tried to find a solution in man yad, on StackOverFlow, find projects using --list on GitHub. It did not help

Victor Ananjevsky

unread,
Dec 22, 2020, 5:18:37 AM12/22/20
to yad-c...@googlegroups.com

hi

output of actions handler must be in a same manner as for reading
data from stdin.

just separate fields with new line character

command string in --row-action is squeezed before use with
g_strcompress() so special characters must be escaped

for your example a working command will look like
--row-action="echo -e 1\\n2\\n3\\n4"

В Mon, 21 Dec 2020 11:50:22 -0800 (PST)
Владимир Лагутин <vladimir....@gmail.com> пишет:

> yad --list --center --width=1100 --height=450 --column=URL:TEXT \
>
> --column=Username:TEXT\
>
> --column=Password:TEXT\
>
> --column=Notes:TEXT\
>
> --editable\
>
> --hscroll-policy=always\
>
> --row-action="echo 1 2 3 4"\
>
> 1 2 3 4 q w e r 6 7 8 9 t y u i


--
wbr

Victor Ananjevsky
Reply all
Reply to author
Forward
0 new messages