From: j8takagi Date: Mon, 1 Jun 2026 11:49:54 +0000 (+0900) Subject: comet2monitorを、![cmd]でシステムコマンドをそのまま実行できる仕様に X-Git-Tag: v0.5p38~2 X-Git-Url: https://j8takagi.net/gitweb?a=commitdiff_plain;h=7845870cee67dd4272632f3c0539012041b2cce8;p=yacasl2.git comet2monitorを、![cmd]でシステムコマンドをそのまま実行できる仕様に --- diff --git a/src/monitor.c b/src/monitor.c index aabb23c..b56306b 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -402,7 +402,9 @@ void monitor() } strip_end(buf); /* 文字列末尾の改行と空白を削除 */ fprintf(stdout, "%s\n", buf); - if((moncmdl = monlinetok(buf)) != NULL) { + if(buf[0] == '!') { + system(buf + 1); + } else if((moncmdl = monlinetok(buf)) != NULL) { cmdtype = monitorcmd(moncmdl->cmd, moncmdl->args); free_moncmdline(moncmdl); }