[Geany-Users] ? Capturing context_action's output

e2qb2a44f at prolan-power.hu e2qb2a44f at xxxxx
Thu Sep 13 23:47:40 UTC 2018


Hi,

Lex Trotman:
> Context actions do not collect the results of the subprocess

But if I have an xterm-like program (xfce4-terminal, under Xubuntu) then it can launch bash, bash can run the
context action, and leave the window open, and show me the result.

I found that if I set the context action to

xfce4-terminal --tab --working-directory=/home/xxx/yyy/zzz -x bash -vc 'echo "%p" && grep -PIr "^using +%s +=";
echo "--$?--" && read -sN1'

then the context action works and -- in my xfce4-terminal, in the last (new) tab -- I can inspect the results.
(The action is, given a word zzz, to grep for "using zzz ="-like texts in directory (and below) /home/xxx/yyy/zzz.)

But:

- The context action does not know about "%p". I wish it would. Currently the action works only for this project
(project's base dir is hardcoded).

- I have to leave Geany and switch to the xfce4-terminal window. (It does not even brings to front currently.)
No integration. (In the Messages pane I could click on a line and Geany would open the file and seek to the line
and highlight the word..)


> build commands show their output in the compiler window

But:

- [The build commands] do not know about (recenty, and if I am correct) the %s wildcard. (Perhaps with a minimal
effort, it could recognize it.)


-- 




More information about the Users mailing list