Skip to content

Conversation

vague666
Copy link
Member

No description provided.

@ailin-nemui
Copy link
Contributor

btw, /exec -o cat

@ailin-nemui
Copy link
Contributor

this is confusing because of the name -out, maybe use "-window" or such?

@dequis
Copy link
Member

dequis commented Apr 2, 2019

Is this intended to write to the channel publicly as /exec -out, or to write to the current window locally as /echo? Because the help string talks about it as the former, and the code behaves as the latter.

Also I don't want to bikeshed but -window is not a great name, as it's usually a parameter that takes a value (like /echo -window <name>).

Ironically -current, which #1024 removes, would make it consistent with /echo (unchangeable default behavior aside)

@vague666
Copy link
Member Author

vague666 commented Apr 2, 2019

-window is used for various purposes, /exec -window sends the output to active window for instance without argument while /echo -window takes an argument. /exec -out sends the output as a msg to the active window which we might not want to mix into this

@dequis
Copy link
Member

dequis commented Apr 2, 2019

Oh, okay, then you probably want to fix the help text which has the same wording as /exec -out

@dequis
Copy link
Member

dequis commented Apr 2, 2019

Sounds fine to me

g_io_channel_set_encoding(handle, NULL, NULL);
g_io_channel_seek_position(handle, fpos, G_SEEK_SET, NULL);
buf = g_string_sized_new(512);
while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) {
buf->str[tpos] = '\0';
printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP |
printtext(NULL, target, MSGLEVEL_CLIENTCRAP |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if -window is given, this should also include server instead of NULL afaik

@ailin-nemui
Copy link
Contributor

really, only use "server" if the flag is given. Otherwise the printtext would curiously end up in the server window of the active item instead of the status window

@ailin-nemui
Copy link
Contributor

@vague666 please rebase this and then we can merge it

Change flag to -window

Updated help

Typo

call printtext with server

Only use server when target is not NULL
@ailin-nemui ailin-nemui merged commit 20f7792 into irssi:master May 13, 2019
ailin-nemui pushed a commit to irssi/irssi.github.io that referenced this pull request May 30, 2019
@ailin-nemui ailin-nemui added this to the 1.3.0 milestone Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants